import { ReactNode } from "react"; import { Handler } from "./handler"; import { HandlerTypes } from "./handler/handler.types"; export declare const DefaultProps: { mediaQuery: boolean; attribute: "class" | `data-${string}`; darkTheme: string; lightTheme: string; defaultTheme: string; storageHandlers: Handler[]; respectHandlerOrder: boolean; colorScheme: boolean; }; export declare type ThemeState = { theme: string | null; resolvedTheme: string | null; triggerType?: HandlerTypes; }; export declare type ThemeConfig = { /** Use media query to toggle the theme between light and dark. If true and no storage handlers find a theme, next-theme falls back onto the media query */ mediaQuery?: boolean; /** The HTML attribute to be set. Defaults to class */ attribute?: `data-${string}` | "class"; /** List of all available theme names, defaults to the two props [lightTheme, darkTheme], eg ["lightTheme", "darkTheme"] */ themes?: string[]; /** Dark theme name */ darkTheme?: string; /** Light theme name */ lightTheme?: string; /** Default theme */ defaultTheme?: string; /** Theme Providers */ storageHandlers?: Handler[]; /** If true, when a handler changes we only use the value of the first handler to yield a valid theme. If false, we accept the new value if valid */ respectHandlerOrder?: boolean; /** Themes for the toggle to loop through */ toggleThemes?: string[]; /** Handle the theme change yourself. Setting this disables next-theme from setting the attribute */ onChange?: (theme: string, resolvedTheme: string) => void; /** Should we set the meta tag colorScheme, if default theme is dark we set it to dark light otherwise light dark */ colorScheme?: boolean; /** The components children */ children?: ReactNode; }; export declare type UseThemeContext = { /** List of all available theme names, defaults to the two props [lightTheme, darkTheme], eg ["lightTheme", "darkTheme"] */ themes: string[] | null; /** The function to call when we want to change the theme */ handleChange: (theme: string) => void; /** The current theme value, if system then returns light/dark */ value: string | null; /** The current theme value including if system is set */ resolvedTheme: string | null; };