import type { FormContextValues, FormState } from './Form.types'; /** * Custom hook to access form context values. * Provides direct access to all form state management functions and values. * * @throws {Error} If used outside of a Form component * @returns {FormContextValues} Object containing form state and control functions * * @example * ```tsx * const MyCustomField = () => { * const { * formState, * formErrors, * updateFieldValue, * resetForm * } = useForm(); * * return ( *
* updateFieldValue('myField', e.target.value)} * /> * {formErrors.myField && {formErrors.myField}} *
* ); * }; * ``` */ export declare const useForm: >>() => FormContextValues; /** * Type-safe version of useForm that returns properly typed form context * * @example * ```tsx * interface MyFormData { * name: string; * email: string; * age: number; * } * * const MyComponent = () => { * const form = useFormTyped(); * // form.formState is now typed as MyFormData * // form.formErrors is now typed as FormErrors * }; * ``` */ export declare const useFormTyped: () => FormContextValues;