/**
 * 语言检测工具函数集合
 *
 * 提供完整的语言检测、判断和转换功能，支持多种检测方式：
 * 1. 浏览器语言设置检测
 * 2. Ant Design ConfigProvider 的 locale 检测
 * 3. localStorage 中保存的用户选择检测
 * 4. 语言代码转换和标准化
 */
export type LanguageType = 'zh-CN' | 'en-US';
/**
 * 支持的语言类型
 */
export declare const SUPPORTED_LANGUAGES: LanguageType[];
/**
 * 语言映射配置
 */
export declare const LANGUAGE_MAP: {
    readonly 'zh-CN': {
        readonly code: "zh-CN";
        readonly name: "简体中文";
        readonly nativeName: "简体中文";
        readonly flag: "🇨🇳";
        readonly antdLocale: "zh_CN";
    };
    readonly 'en-US': {
        readonly code: "en-US";
        readonly name: "English";
        readonly nativeName: "English";
        readonly flag: "🇺🇸";
        readonly antdLocale: "en_US";
    };
};
/**
 * 检测浏览器语言设置
 *
 * @returns 检测到的语言代码，如果无法检测则返回 null
 *
 * @example
 * ```ts
 * const browserLang = detectBrowserLanguage();
 * console.log(browserLang); // 'zh-CN' | 'en-US' | null
 * ```
 */
export declare function detectBrowserLanguage(): LanguageType | null;
/**
 * 检测 Ant Design ConfigProvider 的 locale
 *
 * @returns 检测到的语言代码，如果无法检测则返回 null
 *
 * @example
 * ```ts
 * const antdLang = detectAntdLocale();
 * console.log(antdLang); // 'zh-CN' | 'en-US' | null
 * ```
 */
export declare function detectAntdLocale(): LanguageType | null;
/**
 * 从 localStorage 中获取用户保存的语言选择
 *
 * @param key - localStorage 中的键名，默认为 'md-editor-language'
 * @returns 保存的语言代码，如果没有保存则返回 null
 *
 * @example
 * ```ts
 * const savedLang = getSavedLanguage();
 * console.log(savedLang); // 'zh-CN' | 'en-US' | null
 * ```
 */
export declare function getSavedLanguage(key?: string): LanguageType | null;
/**
 * 保存用户语言选择到 localStorage
 *
 * @param language - 要保存的语言代码
 * @param key - localStorage 中的键名，默认为 'md-editor-language'
 *
 * @example
 * ```ts
 * saveLanguage('en-US');
 * ```
 */
export declare function saveLanguage(language: LanguageType, key?: string): void;
/**
 * 智能语言检测
 *
 * 按优先级检测用户语言偏好：
 * 1. localStorage 中保存的用户选择
 * 2. Ant Design ConfigProvider 的 locale
 * 3. 浏览器语言设置
 * 4. 默认语言
 *
 * @param defaultLanguage - 默认语言，当所有检测方式都失败时使用
 * @returns 检测到的语言代码
 *
 * @example
 * ```ts
 * const detectedLang = detectUserLanguage();
 * console.log(detectedLang); // 'zh-CN' | 'en-US'
 *
 * // 指定默认语言
 * const lang = detectUserLanguage('en-US');
 * ```
 */
export declare function detectUserLanguage(defaultLanguage?: LanguageType): LanguageType;
/**
 * 验证语言代码是否有效
 *
 * @param language - 要验证的语言代码
 * @returns 是否为有效的语言代码
 *
 * @example
 * ```ts
 * isValidLanguage('zh-CN'); // true
 * isValidLanguage('fr-FR'); // false
 * ```
 */
export declare function isValidLanguage(language: string): language is LanguageType;
/**
 * 标准化语言代码
 *
 * @param language - 输入的语言代码
 * @param fallback - 当无法标准化时返回的默认值
 * @returns 标准化后的语言代码
 *
 * @example
 * ```ts
 * normalizeLanguage('zh'); // 'zh-CN'
 * normalizeLanguage('en'); // 'en-US'
 * normalizeLanguage('fr'); // 'zh-CN' (fallback)
 * ```
 */
export declare function normalizeLanguage(language: string, fallback?: LanguageType): LanguageType;
/**
 * 获取语言信息
 *
 * @param language - 语言代码
 * @returns 语言信息对象
 *
 * @example
 * ```ts
 * const langInfo = getLanguageInfo('zh-CN');
 * console.log(langInfo); // { code: 'zh-CN', name: '简体中文', flag: '🇨🇳', ... }
 * ```
 */
export declare function getLanguageInfo(language: LanguageType): {
    readonly code: "zh-CN";
    readonly name: "简体中文";
    readonly nativeName: "简体中文";
    readonly flag: "🇨🇳";
    readonly antdLocale: "zh_CN";
} | {
    readonly code: "en-US";
    readonly name: "English";
    readonly nativeName: "English";
    readonly flag: "🇺🇸";
    readonly antdLocale: "en_US";
};
/**
 * 获取所有支持的语言信息
 *
 * @returns 所有支持的语言信息数组
 *
 * @example
 * ```ts
 * const allLanguages = getAllLanguages();
 * console.log(allLanguages); // [{ code: 'zh-CN', name: '简体中文', ... }, ...]
 * ```
 */
export declare function getAllLanguages(): ({
    readonly code: "zh-CN";
    readonly name: "简体中文";
    readonly nativeName: "简体中文";
    readonly flag: "🇨🇳";
    readonly antdLocale: "zh_CN";
} | {
    readonly code: "en-US";
    readonly name: "English";
    readonly nativeName: "English";
    readonly flag: "🇺🇸";
    readonly antdLocale: "en_US";
})[];
/**
 * 语言切换工具类
 */
export declare class LanguageManager {
    private key;
    private currentLanguage;
    constructor(key?: string, defaultLanguage?: LanguageType);
    /**
     * 获取当前语言
     */
    getCurrentLanguage(): LanguageType;
    /**
     * 设置语言
     */
    setLanguage(language: LanguageType): void;
    /**
     * 切换语言
     */
    toggleLanguage(): LanguageType;
    /**
     * 检测并更新语言
     */
    detectAndUpdate(): LanguageType;
}
/**
 * 创建语言管理器实例
 *
 * @param key - localStorage 键名
 * @param defaultLanguage - 默认语言
 * @returns 语言管理器实例
 *
 * @example
 * ```ts
 * const langManager = createLanguageManager();
 * langManager.setLanguage('en-US');
 * const current = langManager.getCurrentLanguage();
 * ```
 */
export declare function createLanguageManager(key?: string, defaultLanguage?: LanguageType): LanguageManager;
