/**
 * Config 模块类型定义
 */
interface ConfigItem {
    key: string;
    value: any;
    type: string;
    isRequired: boolean;
    isSensitive: boolean;
    description?: string;
    defaultValue?: any;
    readonly?: boolean;
}
interface AllConfigs {
    [category: string]: {
        [key: string]: ConfigItem;
    };
}
interface UseConfigsOptions {
    /**
     * API 基础 URL
     */
    apiBaseUrl?: string;
    /**
     * 获取认证 token 的函数
     */
    getAuthToken: () => string | null | Promise<string | null>;
    /**
     * 未认证时的回调（可选）
     */
    onUnauthorized?: () => void;
    /**
     * 缓存去重时间（毫秒）
     */
    dedupingInterval?: number;
    /**
     * 是否在窗口聚焦时重新验证
     */
    revalidateOnFocus?: boolean;
}

/**
 * 创建 useConfigs Hook
 */
declare function createUseConfigs(options: UseConfigsOptions): () => {
    configs: AllConfigs | undefined;
    isLoading: boolean;
    isError: boolean;
    error: any;
    updateConfigs: (category: string, updates: Record<string, any>) => Promise<{
        success: boolean;
    }>;
    refresh: () => void;
};
/**
 * 预加载配置
 */
declare function prefetchConfigs(apiBaseUrl?: string): void;
/**
 * 全局缓存失效
 */
declare function invalidateAllConfigs(apiBaseUrl?: string): void;

export { type AllConfigs, type ConfigItem, type UseConfigsOptions, createUseConfigs, invalidateAllConfigs, prefetchConfigs };
