import type { FormValue } from '../sharedTypes/formHelperTypes'; /** * Hook that retrieves the current value of a specific form field from the form context. * This hook provides type-safe access to form field values and ensures the component is used within a FormProvider. * It throws an error if used outside of a form context to prevent runtime issues. * * @param name The name of the form field to retrieve the value for. * @returns The current value of the specified form field, or undefined if the field has no value. * * @throws {Error} When used outside of a FormProvider context. * * @example * ```tsx * const MyComponent = () => { * const emailValue = useFormFieldValue('email'); * * return ( *
* Current email: {emailValue || 'No email entered'} *
* ); * }; * ``` */ export declare const useFormFieldValue: (name: string) => T | undefined;