import { type ComputedRef, type MaybeRefOrGetter, type Ref } from "vue"; export interface UseFieldsetValidationKitOptions { /** * Consumer-owned submit state. The kit reads this value but never mutates it. */ submitted: MaybeRefOrGetter; /** * Returns the real validity of the fieldset when validation is active. */ isValid: () => boolean; } /** * API returned by {@link useFieldsetValidationKit}. */ export interface UseFieldsetValidationKitApi { /** * Becomes true after the first focus transition that leaves the fieldset. */ touched: Ref; /** * Delayed validation gate. True when either submitted or touched is true. */ fieldsetValidate: ComputedRef; /** * Forwards fieldset focusout events to the internal touch tracker. */ onFocusout: (event: FocusEvent) => void; /** * Clears touched state and suppresses one immediate post-reset focusout. * * This avoids re-activating delayed validation from reset-related focus * transitions (for example, clicking Reset while an input is focused). */ reset: () => void; /** * Wraps a field-level validity source with delayed validation behavior. */ createFieldValidity: (isValid: MaybeRefOrGetter) => ComputedRef; /** * Builds a named map of delayed field validity refs for ergonomic form setup. */ createFieldValidationsMap: >>(isValidMap: T) => { [K in keyof T]: ComputedRef; }; /** * Moves focus to the first invalid Kendo control found within the provided form. */ focusFirstInvalidField: (formRef: MaybeRefOrGetter) => void; } /** * Orchestrates delayed fieldset validation using submit state and touch state. * * Intended as the primary form-level API for gated validity UX: * - validation displays after submit or first fieldset exit * - field-level validity can be composed through helper factories * - invalid focus and reset behavior are handled consistently * * @param fieldsetRef Reference to the fieldset whose focus transitions are tracked. * @param options Consumer-provided submit state and base validity function. * @returns Validation kit API for wiring fieldset-level and field-level behavior. */ export declare function useFieldsetValidationKit(fieldsetRef: Ref, options: UseFieldsetValidationKitOptions): UseFieldsetValidationKitApi;