import type { ParsedRule } from '@openuidev/lang-core'; /** * Validation state and helpers for OpenUI form fields. */ export interface FormValidationContextValue { errors: Record; getFieldError: (name: string) => string | undefined; validateField: (name: string, value: unknown, rules: ParsedRule[]) => boolean; registerField: (name: string, rules: ParsedRule[], getValue: () => unknown) => void; unregisterField: (name: string) => void; validateForm: () => boolean; clearFieldError: (name: string) => void; } export declare const FormValidationContext: import("react").Context; /** * Read the nearest OpenUI form validation context, if one exists. */ export declare function useFormValidation(): FormValidationContextValue | null; /** * Create form validation state and callbacks for an OpenUI form boundary. */ export declare function useCreateFormValidation(): FormValidationContextValue;