import { type ReactNode } from 'react';
/**
 * Theme type - supports light and dark modes
 */
export type Theme = 'light' | 'dark';
/**
 * Context value provided by ThemeProvider
 */
export interface ThemeContextValue {
    /** Current theme */
    theme: Theme;
    /** Resolved theme (same as theme since we don't support 'system') */
    resolvedTheme: Theme;
    /** Set the theme explicitly */
    setTheme: (theme: Theme) => void;
    /** Toggle between light and dark themes */
    toggleTheme: () => void;
}
/**
 * Props for the ThemeProvider component
 */
export interface ThemeProviderProps {
    /** Child components */
    children: ReactNode;
    /** Default theme to use when no stored value exists (default: 'light') */
    defaultTheme?: Theme;
    /** localStorage key for persisting theme (default: 'theme') */
    storageKey?: string;
}
/**
 * ThemeProvider component
 *
 * Provides theme context to the application with support for:
 * - Persistent theme storage via localStorage
 * - DOM class management for CSS-based theming
 * - Cross-tab synchronization via storage events
 *
 * @llms Theme context provider with localStorage persistence, cross-tab sync, light/dark modes
 * @example
 * ```tsx
 * <ThemeProvider defaultTheme="dark" storageKey="my-app-theme">
 *   <App />
 * </ThemeProvider>
 * ```
 */
export declare function ThemeProvider({ children, defaultTheme, storageKey, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
/**
 * Hook to access the theme context
 *
 * @throws Error if used outside of ThemeProvider
 *
 * @example
 * ```tsx
 * function MyComponent() {
 *   const { theme, setTheme, toggleTheme } = useTheme();
 *
 *   return (
 *     <button onClick={toggleTheme}>
 *       Current theme: {theme}
 *     </button>
 *   );
 * }
 * ```
 */
export declare function useTheme(): ThemeContextValue;
/**
 * Hook to optionally access the theme context without throwing
 *
 * Returns null if used outside of ThemeProvider, making it safe for
 * components that support both controlled and uncontrolled modes.
 *
 * @example
 * ```tsx
 * function MyComponent({ value, onValueChange }) {
 *   const themeContext = useThemeOptional();
 *   const isControlled = value !== undefined;
 *
 *   // Use controlled value if provided, otherwise context
 *   const theme = isControlled ? value : themeContext?.theme;
 * }
 * ```
 */
export declare function useThemeOptional(): ThemeContextValue | null;
