import { default as React, ReactNode } from 'react'; import { ConfigRecord, ConfigValue, ConfigSchema } from './types'; /** * Config context value type */ export interface ConfigContextValue { config: T; get: (path: string, defaultValue?: V) => V; set: (path: string, value: ConfigValue) => void; has: (path: string) => boolean; reset: () => void; reload: () => Promise; subscribe: (listener: (event: import('../contexts/ConfigContext').ConfigChangeEvent) => void) => () => void; isLoading: boolean; error: Error | null; } declare const ConfigContext: React.Context | null>; /** * Props for ConfigProvider component. */ export interface ConfigProviderProps { /** Child components */ children: ReactNode; /** Default configuration values */ config: T; /** Configuration schema for validation */ schema?: ConfigSchema; /** Environment variable prefix */ envPrefix?: string; /** Remote configuration URL */ remoteUrl?: string; /** Loading component */ loadingComponent?: ReactNode; /** Error component */ errorComponent?: (error: Error) => ReactNode; /** Enable debug logging */ debug?: boolean; /** Called when configuration is loaded */ onLoad?: (config: T) => void; /** Called when configuration changes */ onChange?: (config: T) => void; /** Called on configuration error */ onError?: (error: Error) => void; } /** * Configuration provider component. */ export declare function ConfigProvider({ children, config: defaultConfig, schema, envPrefix, remoteUrl, loadingComponent, errorComponent, debug, onLoad, onChange, onError, }: ConfigProviderProps): React.JSX.Element; /** * Hook to access the configuration context. */ export declare function useConfigContext(): ConfigContextValue; /** * Hook to access configuration context optionally. */ export declare function useOptionalConfigContext(): ConfigContextValue | null; /** * HOC to inject configuration as props. */ export declare function withConfig

(Component: React.ComponentType

; }>): React.FC

; export { ConfigContext };