import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactNode } from 'react'; import { FieldValues, FieldPath, ControllerProps, ControllerRenderProps, FieldError } from 'react-hook-form'; import { AutosaveState } from './use-autosave.js'; interface FormFieldIds { control: string; description: string; message: string; } type FormFieldRenderProps = FieldPath> = { field: ControllerRenderProps; autosave?: AutosaveState; error?: FieldError; ids: FormFieldIds; }; type FormFieldProps = FieldPath> = Omit, 'render'> & { children: (props: FormFieldRenderProps) => ReactNode; onAutosave?: (value: FieldValues[TName]) => Promise; autosaveDebounceMs?: number; }; declare const FormField: = FieldPath>({ children, onAutosave, autosaveDebounceMs, ...props }: FormFieldProps) => react_jsx_runtime.JSX.Element; export { FormField, type FormFieldIds, type FormFieldRenderProps, FormField as default };