import { type RefObject } from 'react'; import type { FormControlRef } from '../../shared-types.js'; import { type MessageTarget } from '../../validation/message-routing.js'; import type { ValidationState } from '../../validation/types.js'; import type { ValidateFieldOptions } from '../form.types.js'; export interface InternalFormRegistrationOptions { id?: string; name?: string; form?: string; /** * Where this control's native/Strato messages render, from the control's * `_messageTarget` prop. Defaults to the field outlet. */ messageTarget?: MessageTarget | MessageTarget[]; value?: TValue; controlRef?: RefObject | null>; onValidityChange?: (state: ValidationState) => void; getValue?: () => unknown; focus?: () => void; validateField?: (options: ValidateFieldOptions) => Promise; resetValidation?: () => void; } /** * Internal registration hook for Strato-owned controls. Strato controls compute their * own `ValidationState` (native + Strato + custom messages) through the * `FormField` message pipeline; this hook hands that pipeline's * `validateField` and value/focus accessors to the enclosing `
` so the * control participates in submit, aggregation, snapshot, and focus-first-invalid * with no per-control runtime of its own. * * It is the counterpart to the public `useFormRegistration`: same * registration primitive, but fed by the Strato validity pipeline instead of a * consumer-supplied validator. Returns a `reportValidity` the control tees its * live emissions into, or a no-op when there is no enclosing form. * @internal */ export declare function useInternalFormRegistration(options: InternalFormRegistrationOptions): { id: string; onValidityChange: (state: ValidationState) => void; }; //# sourceMappingURL=useInternalFormRegistration.d.ts.map