import * as React from 'react'; import type { NativeSyntheticEvent, TextInput, TextInputFocusEventData } from 'react-native'; import { type FieldRootContext } from '../root/FieldRootContext'; export interface UseFieldControlParameters { value?: string | undefined; defaultValue?: string | undefined; onValueChange?: ((value: string) => void) | undefined; nativeID?: string | undefined; /** * The input element, so a surrounding `Form` can focus it when submission * stops here. */ inputRef?: React.RefObject | undefined; /** * Whether a surrounding `Field.Root` is required. `Field.Control` passes * `true`; a standalone `Input` passes `false` and works without one. */ requireField: boolean; } /** * The behaviour shared by `Field.Control` and `Input`: controlled/uncontrolled * text, validation timing, the field's `filled`/`dirty`/`touched`/`focused` * bookkeeping, and the accessibility wiring to the label and messages. */ export declare function useFieldControl(parameters: UseFieldControlParameters): { field: FieldRootContext | undefined; value: string; props: { nativeID: string | undefined; value: string; onChangeText: (text: string) => void; onFocus: () => void; onBlur: (_event: NativeSyntheticEvent) => void; editable: boolean; accessibilityLabelledBy: string | undefined; accessibilityDescribedBy: string | undefined; 'aria-labelledby': string | undefined; 'aria-describedby': string | undefined; accessibilityState: { disabled: true | undefined; }; 'aria-invalid': true | undefined; }; }; //# sourceMappingURL=useFieldControl.d.ts.map