/** * DECISION-2 C-Hybrid theme contract — system default + user override. * * Persists `light` | `dark` | `system` in per-app `localStorage` keys. * Effective palette is applied via the `.dark` / `.light` class on ``. */ export type ThemePreference = 'light' | 'dark' | 'system'; export type EffectiveTheme = 'light' | 'dark'; /** Per-app `localStorage` keys (isolated so toggles do not leak across surfaces). */ export declare const THEME_STORAGE_KEYS: { readonly admin: "rpapp-admin-theme"; readonly customer: "rpapp-customer-theme"; readonly kiosk: "rpapp-kiosk-theme"; readonly pickup: "rpapp-pickup-theme"; }; export type ThemeAppId = keyof typeof THEME_STORAGE_KEYS; export interface ThemeApi { applyInitialTheme: () => void; setTheme: (pref: ThemePreference) => void; getThemePreference: () => ThemePreference; getEffectiveTheme: () => EffectiveTheme; /** Re-sync when OS preference changes while preference is `system`. */ subscribeToSystemTheme: (onChange?: () => void) => () => void; } export interface ThemeApplyOptions { /** When true, explicit `light` preference adds `.light` to override system dark media. */ readonly lightOverrideEnabled?: boolean; /** * Preference when `localStorage` is empty. * Admin uses `light` so dark is only on after an explicit toggle. * Default: `system` (follow OS). */ readonly defaultPreference?: ThemePreference; /** * When preference is `system`, resolve to this instead of OS. * Use `light` with admin so legacy `system` values do not auto-dark. */ readonly systemResolvesTo?: EffectiveTheme; } /** * Imperative theme controller for a single app surface. * Call `applyInitialTheme()` before the first React paint to avoid flash. */ export declare function createThemeApi(storageKey: string, options?: ThemeApplyOptions): ThemeApi; /** Convenience for boot scripts that only need the initial `.dark` sync. */ export declare function applyInitialTheme(storageKey: string): void; /** Convenience for imperative toggles outside React. */ export declare function setTheme(storageKey: string, pref: ThemePreference): void; //# sourceMappingURL=themeContract.d.ts.map