import * as vue from 'vue';
import { isCityCached, clearCache } from '../zip6/loader.js';

interface SearchResult {
    city: string;
    area: string;
    road: string;
}
interface Zip6Result {
    zipcode: string;
    zip3: string;
    city: string;
    area: string;
    road: string;
}
interface UseTwZip6Options {
    /** 資料來源 URL（預設使用 jsDelivr CDN） */
    baseUrl?: string;
    /** 預載入的縣市列表 */
    preload?: string[];
}
declare function useTwZip6(options?: UseTwZip6Options): {
    loading: vue.Ref<boolean, boolean>;
    cities: vue.Ref<string[], string[]>;
    areas: vue.Ref<string[], string[]>;
    roads: vue.Ref<string[], string[]>;
    city: vue.Ref<string, string>;
    area: vue.Ref<string, string>;
    road: vue.Ref<string, string>;
    number: vue.Ref<number | undefined, number | undefined>;
    lane: vue.Ref<number | undefined, number | undefined>;
    alley: vue.Ref<number | undefined, number | undefined>;
    setCity: (value: string) => Promise<void>;
    setArea: (value: string) => void;
    setRoad: (value: string) => void;
    searchRoads: (keyword: string) => void;
    searchResults: vue.Ref<{
        city: string;
        area: string;
        road: string;
    }[], SearchResult[] | {
        city: string;
        area: string;
        road: string;
    }[]>;
    zipCode: vue.ComputedRef<string>;
    zip3: vue.ComputedRef<string>;
    result: vue.ComputedRef<Zip6Result | undefined>;
    preloadCities: (citiesToPreload: string[]) => Promise<void>;
    isCityCached: typeof isCityCached;
    clearCache: typeof clearCache;
};

export { type SearchResult, type UseTwZip6Options, type Zip6Result, useTwZip6 };
