import { default as React } from 'react'; export interface Toggle { /** The application name that owns this toggle */ application: string; /** Whether the toggle is currently enabled or disabled */ enabled: boolean; /** Unique identifier for the toggle */ key: string; /** Human-readable name for the toggle */ name: string; } interface ToggleProviderContextValue { /** Array of available toggles, undefined while loading */ toggles: Toggle[] | undefined; /** Function to set a toggle override */ setToggleOverride?: (key: string, value: boolean) => void; } export declare const ToggleProviderContext: React.Context; interface ToggleProviderProps { /** Child components that will have access to the toggle context */ children: React.ReactNode; /** Distribution key used to identify which toggles to fetch from the CDN */ distributionKey: string; /** Environment to fetch toggles for (determines which CDN endpoint to use) */ environment: 'development' | 'staging' | 'production'; /** Optional callback function that gets called if there's an error fetching toggles */ errorCallback?: (error: string | Record) => void; /** Optional callback function that gets called when toggle loading is finished (success or error) */ finishedLoadingCallback?: (isLoaded: boolean) => void; } declare const ToggleProvider: ({ children, distributionKey, environment, errorCallback, finishedLoadingCallback, }: ToggleProviderProps) => React.JSX.Element; export default ToggleProvider;