/**
 * Browser-compatible settings for Android/WebView.
 * Replaces @bobfrankston/mailx-settings which depends on node:fs.
 *
 * Settings are stored in IndexedDB and synced to Google Drive
 * via the GDrive API (same API as desktop cloud mode).
 *
 * On first run, settings are fetched from GDrive. Subsequent reads
 * use the local IndexedDB cache. Writes go to both.
 */
import type { AccountConfig, MailxSettings, AutocompleteSettings } from "@bobfrankston/mailx-types";
export declare function setGDriveTokenProvider(provider: () => Promise<string>): void;
export declare function setGDriveFolderId(folderId: string, folderName?: string, ownerEmail?: string, folderPath?: string): void;
export declare function cloudRead(filename: string): Promise<string | null>;
export declare function cloudWrite(filename: string, content: string): Promise<boolean>;
/** Cheap freshness probe: one Drive metadata request (no content download).
 *  Returns the file's modifiedTime, or null if unreachable / missing. */
export declare function cloudStat(filename: string): Promise<{
    id: string;
    modifiedTime: string;
} | null>;
declare const DEFAULT_PREFERENCES: {
    ui: {
        theme: "system";
        editor: "quill";
        folderWidth: number;
        listViewerSplit: number;
        fontSize: number;
    };
    sync: {
        intervalMinutes: number;
        historyDays: number;
        prefetch: boolean;
    };
    autocomplete: {
        enabled: boolean;
        provider: "off";
        ollamaUrl: string;
        ollamaModel: string;
        cloudApiKey: string;
        cloudModel: string;
        debounceMs: number;
        maxTokens: number;
    };
};
declare const DEFAULT_ALLOWLIST: {
    senders: string[];
    domains: string[];
    recipients: string[];
    flaggedSenders: string[];
    flaggedDomains: string[];
};
/** Load accounts — first from IndexedDB cache, then GDrive */
export declare function loadAccounts(): Promise<AccountConfig[]>;
/** Load accounts directly from GDrive, bypassing local cache */
export declare function loadAccountsFromCloud(): Promise<AccountConfig[]>;
/** Save accounts to IndexedDB and GDrive */
export declare function saveAccounts(accounts: AccountConfig[]): Promise<void>;
/** Load preferences */
export declare function loadPreferences(): Promise<typeof DEFAULT_PREFERENCES>;
/** Save preferences */
export declare function savePreferences(prefs: any): Promise<void>;
/** Load full settings (accounts + preferences combined) */
export declare function loadSettings(): Promise<MailxSettings>;
/** Save full settings */
export declare function saveSettings(settings: MailxSettings): Promise<void>;
/** Load allowlist */
export declare function loadAllowlist(): Promise<typeof DEFAULT_ALLOWLIST>;
/** Save allowlist */
export declare function saveAllowlist(list: typeof DEFAULT_ALLOWLIST): Promise<void>;
/** Load autocomplete settings */
export declare function loadAutocomplete(): Promise<AutocompleteSettings>;
/** Save autocomplete settings */
export declare function saveAutocomplete(settings: AutocompleteSettings): Promise<void>;
/** Get history days — read from preferences */
export declare function getHistoryDays(): Promise<number>;
/** Get prefetch setting */
export declare function getPrefetch(): Promise<boolean>;
/** Get storage info */
export declare function getStorageInfo(): {
    provider: string;
    mode: string;
    folderId?: string;
    folderName?: string;
    folderPath?: string;
    folderOwner?: string;
};
/** Clear all cached settings — used for "Reset Store" */
export declare function clearSettings(): Promise<void>;
/** Get or create a stable device ID (UUID stored in localStorage) */
export declare function getDeviceId(): string;
/** Save device-specific settings to GDrive (devices/<deviceId>/state.json) */
export declare function saveDeviceState(state: any): Promise<void>;
/** Load device-specific settings */
export declare function loadDeviceState(): Promise<any>;
export {};
//# sourceMappingURL=web-settings.d.ts.map