import { ThemeState } from './types.js'; /** * Client-side helpers for interacting with the theme * These are meant to be used in client-side scripts */ declare global { interface Window { __ASTRO_THEMES__?: ThemeState; } } /** * Get the current theme state * Returns undefined if ThemeProvider is not mounted */ declare function getTheme(): ThemeState | undefined; /** * Set the theme * @param theme - Theme name or function that receives current theme and returns new theme */ declare function setTheme(theme: string | ((prevTheme: string) => string)): void; /** * Get the resolved theme (system theme resolved to actual value) */ declare function getResolvedTheme(): string | undefined; /** * Get the system theme preference */ declare function getSystemTheme(): "dark" | "light" | undefined; /** * Check if theme is forced for the current page */ declare function isForcedTheme(): boolean; /** * Get the list of available themes */ declare function getThemes(): string[]; /** * Subscribe to theme changes * @param callback - Function called when theme changes * @returns Cleanup function to unsubscribe */ declare function onThemeChange(callback: (detail: { theme: string; resolvedTheme: string; }) => void): () => void; /** * Toggle between light and dark themes * If current theme is neither light nor dark, switches to light */ declare function toggleTheme(): void; export { getResolvedTheme, getSystemTheme, getTheme, getThemes, isForcedTheme, onThemeChange, setTheme, toggleTheme };