export type I18nLangItem = {
    code: string;
    name: string;
    flag?: string;
    status?: number;
};
export type LocalePersist = {
    get: (key: string) => string | null | undefined;
    set: (key: string, value: string) => void;
};
export type LocalePackApi = {
    locales?: (q: {
        scopeKey: string;
    }) => Promise<I18nLangItem[] | null>;
    hostLocales?: (q?: {
        scopeKey?: string;
    }) => Promise<I18nLangItem[] | null>;
    active?: (q: {
        langCode: string;
        scopeKey: string;
        scopeType?: string;
    }) => Promise<{
        packJson?: Record<string, unknown>;
        version?: number;
    } | null>;
    list?: (q: Record<string, unknown>) => Promise<Array<{
        langCode?: string;
    }>>;
};
export type CreateLocaleStoreOptions = {
    /** pinia store id，默认 locale */
    id?: string;
    storageKey: string;
    scopeKey: string;
    defaultLocale?: string;
    /** web/uniapp 静态源包；admin 可空 */
    defaultPack?: Record<string, unknown>;
    persist: LocalePersist;
    getPackApi: () => LocalePackApi | undefined;
    /**
     * admin：优先 hostLocales；app：locales({ scopeKey })
     * 默认按 scopeKey===admin 分支
     */
    langMode?: 'admin' | 'app';
    /** 切换语种时缓存已拉过的包（web/uniapp） */
    cachePacks?: boolean;
    /** admin：注入 CRUD 翻译 */
    onPackLoaded?: (ctx: {
        t: (key: string, fallback?: string, ...args: Array<string | number | Record<string, string | number | null | undefined>>) => string;
    }) => void;
    /** admin：菜单名 tMenu */
    enableMenu?: boolean;
};
/**
 * 三端共用 locale store 工厂
 * - admin：langMode=admin + onPackLoaded(setCrudTranslator) + enableMenu
 * - web/uniapp：defaultPack + cachePacks + langMode=app
 * - setLocale：升 localeEpoch + notifyLocaleChange（订阅 / CustomEvent / uni.$emit）
 */
export declare function createLocaleStore(options: CreateLocaleStoreOptions): import("pinia").StoreDefinition<string, {
    locale: string;
    langs: I18nLangItem[];
    messages: Record<string, unknown>;
    packCache: Record<string, Record<string, unknown>>;
    version: number;
    loaded: boolean;
    /** 切语种递增；宿主可用 `:key="localeEpoch"` 或 watch 重拉接口 */
    localeEpoch: number;
}, {
    currentLang(state: {
        locale: string;
        langs: {
            code: string;
            name: string;
            flag?: string;
            status?: number;
        }[];
        messages: Record<string, unknown>;
        packCache: Record<string, Record<string, unknown>>;
        version: number;
        loaded: boolean;
        localeEpoch: number;
    } & import("pinia").PiniaCustomStateProperties<{
        locale: string;
        langs: I18nLangItem[];
        messages: Record<string, unknown>;
        packCache: Record<string, Record<string, unknown>>;
        version: number;
        loaded: boolean;
        /** 切语种递增；宿主可用 `:key="localeEpoch"` 或 watch 重拉接口 */
        localeEpoch: number;
    }>): I18nLangItem | undefined;
}, {
    t(key: string, fallback?: string, ...args: Array<string | number | Record<string, string | number | null | undefined>>): string;
    tMenu(item: {
        id?: number;
        name?: string;
    }): string;
    applyCrudLocale(): void;
    loadLangs(): Promise<void>;
    loadPack(locale?: string): Promise<void>;
    initLocale(): Promise<void>;
    setLocale(code: string): Promise<void>;
}>;
export { LOCALE_CHANGE_EVENT, subscribeLocaleChange, notifyLocaleChange, useOnLocaleChange, type LocaleChangeDetail, } from './locale-change';
