import { default as React } from 'react'; import { PairComponent, PairComponentControl, ActivePairComponentState } from '../types/pairComponent'; import { FunctionType } from '../api/types'; /** * Context value for PairComponents */ export interface PairComponentContextType { /** Currently active component state */ activeComponent: ActivePairComponentState | null; /** Whether the panel is open */ isPanelOpen: boolean; /** Activate a component by name */ activateComponent: (name: string, initialData?: Record) => boolean; /** Deactivate the current component */ deactivateComponent: () => void; /** Set the active field for highlighting */ setActiveField: (field: string | undefined) => void; /** Get current UI tools (base + component-specific) */ getUITools: () => FunctionType[]; /** Get the control ref for the active component */ getControlRef: () => React.RefObject | null; /** Handle success from component */ handleSuccess: (result: any) => void; /** Handle error from component */ handleError: (error: Error) => void; /** Close the panel (with confirmation) */ closePanel: () => void; /** Whether close confirmation dialog is showing */ showCloseConfirmation: boolean; /** Confirm close (dismiss confirmation and deactivate) */ confirmClose: () => void; /** Cancel close (dismiss confirmation, keep panel open) */ cancelClose: () => void; /** Confirm close and don't ask again for this session */ confirmCloseAndDontAsk: () => void; } declare const PairComponentContext: React.Context; /** * Props for PairComponentProvider */ export interface PairComponentProviderProps { children: React.ReactNode; /** Additional PairComponents to register */ pairComponents?: PairComponent[]; /** Callback when a component operation succeeds */ onComponentSuccess?: (componentName: string, result: any) => void; /** Callback when a component operation fails */ onComponentError?: (componentName: string, error: Error) => void; /** Callback when component is activated */ onComponentActivated?: (componentName: string) => void; /** Callback when component is deactivated */ onComponentDeactivated?: (componentName: string) => void; } /** * Provider for PairComponent state and tools */ export declare function PairComponentProvider({ children, pairComponents, onComponentSuccess, onComponentError, onComponentActivated, onComponentDeactivated, }: PairComponentProviderProps): import("react/jsx-runtime").JSX.Element; /** * Hook to use PairComponent context */ export declare function usePairComponents(): PairComponentContextType; /** * Hook to check if PairComponents are available (for conditional usage) */ export declare function usePairComponentsOptional(): PairComponentContextType | null; export default PairComponentContext;