import { type RefObject } from 'react'; export interface FormFieldContextShape { id: string; helpId: string; errorId: string; describedBy: string; invalid: boolean; required: boolean; disabled: boolean; /** The field's label text, for a control that cannot be named by `for`. */ label?: string; /** * A control reports the id it really renders, so the label's `for` * follows it. Returns the release. Call it from an effect; prefer * `useFormFieldControlId`. */ registerControlId?: (controlId: string) => () => void; /** * A control shows a short note under the field, e.g. that a paste was * refused; `undefined` removes it. The control announces it itself. */ setNotice?: (notice: string | undefined) => void; } export declare const FormFieldContext: import("react").Context; export declare function useFormField(): FormFieldContextShape; /** * The id a control renders: its own `id`, else the field's. Inside a * `` the id is reported to the field, so the label's `for` * points at the control even when the host chose the id. */ export declare function useFormFieldControlId(ctx: FormFieldContextShape, id?: string): string; /** * For a control whose id is written by a library (cmdk): reports the id the * element really has, read from the DOM after mount. */ export declare function useFormFieldControlRef(ctx: FormFieldContextShape, ref: RefObject): void; //# sourceMappingURL=form-field-context.d.ts.map