import { type ReactNode } from 'react'; import { type ColorScheme } from './useColorScheme'; import { type FunkitThemeSet } from './useFunkitTheme'; interface FunkitColorSchemeValue { /** The active, resolved color scheme. */ colorScheme: ColorScheme; /** * Flip light↔dark, or set a specific scheme when an argument is given. * **No-op when the provider's `colorScheme` prop is set** (controlled mode) — * the host owns the scheme in that case. */ toggleColorScheme: (next?: ColorScheme) => void; /** True when the scheme is forced by the `colorScheme` prop (uncontrolled toggle disabled). */ isControlled: boolean; } export interface FunkitThemeProviderProps { children: ReactNode; /** * The light/dark Restyle theme set. Defaults to the built-in Fun Mobile * themes. Pass `{ light, dark }` from `toRestyleTheme(...)` to customize. */ themes?: FunkitThemeSet; /** * Force a color scheme. When provided the provider is **controlled**: it * always renders this scheme, ignores the system Appearance, and * `toggleColorScheme()` becomes a no-op. When omitted the provider is * **uncontrolled**: the scheme follows the system Appearance and can be * flipped with `toggleColorScheme()`. */ colorScheme?: ColorScheme; } /** * The styling layer for `@funkit/connect-rn`. Resolves the active Restyle theme * (selected from `themes` by color scheme), wires it into Restyle's * `ThemeProvider`, and exposes the scheme + a manual toggle via * {@link useFunkitColorScheme}. * * This is an internal-ish provider — host apps mount the user-facing * {@link FunkitProvider}, which passes `themes` / `colorScheme` down to this. */ export declare function FunkitThemeProvider({ children, themes, colorScheme, }: FunkitThemeProviderProps): import("react").JSX.Element; /** * Read the active color scheme and toggle it. Must be used within a * {@link FunkitProvider} (which mounts {@link FunkitThemeProvider}). * `toggleColorScheme` is a no-op when the provider is in controlled mode (a * `colorScheme` prop was passed). */ export declare function useFunkitColorScheme(): FunkitColorSchemeValue; export {}; //# sourceMappingURL=FunkitThemeProvider.d.ts.map