import { S as StorageAdapter } from '../types-BaZccpvk.js';
export { a as StorageChangeEvent } from '../types-BaZccpvk.js';
export { b as useAsyncStorage, d as useElectronStorage, a as useLocalStorage, u as useStorage, c as useTaroStorage } from '../useElectronStorage-DwnNfIhl.js';

/**
 * Web 平台存储适配器 (localStorage)
 */

declare class WebStorageAdapter implements StorageAdapter {
    getItem(key: string): Promise<string | null>;
    setItem(key: string, value: string): Promise<void>;
    removeItem(key: string): Promise<void>;
    clear(): Promise<void>;
    addChangeListener(callback: (key: string, value: string | null) => void): () => void;
    /**
     * 触发自定义事件，通知同标签页的其他组件
     */
    dispatchChange(key: string, value: string | null): void;
}

/**
 * React Native 平台存储适配器 (AsyncStorage)
 */

declare class ReactNativeStorageAdapter implements StorageAdapter {
    private listeners;
    getItem(key: string): Promise<string | null>;
    setItem(key: string, value: string): Promise<void>;
    removeItem(key: string): Promise<void>;
    clear(): Promise<void>;
    addChangeListener(callback: (key: string, value: string | null) => void): () => void;
    private notifyListeners;
}

/**
 * 小程序平台存储适配器 (wx.storage / Taro.storage)
 * 仅在小程序环境下加载和使用
 */

declare class MiniAppStorageAdapter implements StorageAdapter {
    private listeners;
    getItem(key: string): Promise<string | null>;
    setItem(key: string, value: string): Promise<void>;
    removeItem(key: string): Promise<void>;
    clear(): Promise<void>;
    addChangeListener(callback: (key: string, value: string | null) => void): () => void;
    private notifyListeners;
}

/**
 * Electron 桌面端存储适配器
 *
 * Electron 渲染进程可以使用 localStorage（和 Web 相同）
 * 但我们提供专门的适配器以支持未来可能的主进程存储需求
 */

declare class ElectronStorageAdapter implements StorageAdapter {
    private listeners;
    getItem(key: string): Promise<string | null>;
    setItem(key: string, value: string): Promise<void>;
    removeItem(key: string): Promise<void>;
    clear(): Promise<void>;
    /**
     * 添加存储变化监听器
     * 支持跨 Electron 窗口同步
     */
    addChangeListener(listener: (key: string, newValue: string | null) => void): () => void;
    removeChangeListener(listener: (key: string, newValue: string | null) => void): void;
    /**
     * 通知监听器
     */
    private notifyListeners;
}

export { ElectronStorageAdapter, MiniAppStorageAdapter, ReactNativeStorageAdapter, StorageAdapter, WebStorageAdapter };
