import { ReactNode } from 'react'; /** * Validation state. */ export interface ValidationState { errors: Map; touched: Set; } /** * Validation context type. */ export interface ValidationContextType { /** Get error for field */ getError: (fieldId: string) => string | null; /** Set error for field */ setError: (fieldId: string, error: string | null) => void; /** Mark field as touched */ touch: (fieldId: string) => void; /** Check if field is touched */ isTouched: (fieldId: string) => boolean; /** Clear all errors */ clearErrors: () => void; /** Clear error for specific field */ clearError: (fieldId: string) => void; /** Validate all fields */ validateAll: () => boolean; /** Check if form is valid */ isValid: boolean; /** Get all errors */ getAllErrors: () => Map; /** Set multiple errors at once */ setErrors: (errors: Record) => void; } /** * Hook to access validation context. * * @returns ValidationContextType * @throws Error if used outside ValidationProvider */ export declare function useValidationContext(): ValidationContextType; /** * Hook to access validation context (optional). * * @returns ValidationContextType | null */ export declare function useValidationContextOptional(): ValidationContextType | null; /** * Props for ValidationProvider. */ export interface ValidationProviderProps { children: ReactNode; } /** * Provider for validation context. */ export declare function ValidationProvider({ children }: ValidationProviderProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=validation-context.d.ts.map