import { AriaAttributes, type RefObject, type FormEvent as ReactFormEvent, type ChangeEvent, type FocusEvent } from 'react'; import { AriaLabelingProps } from '../../../core/types/a11y-props.js'; /** * Getter function to read the error type form the validity state. * The validity state values are readonly and can't therefore not be iterated but need to accessed directly instead. * https://stackoverflow.com/questions/20891950/html-validation-api-returns-an-empty-object-in-firefox?rq=2 * @internal */ export declare function getErrorType(validityState?: ValidityState): "badInput" | "patternMismatch" | "rangeOverflow" | "rangeUnderflow" | "stepMismatch" | "tooLong" | "tooShort" | "typeMismatch" | "valueMissing" | null; /** * Internal getter function to return the matching formatted message for * each validityStateKey. * @internal */ export declare function getI18nErrorMessage(key: keyof ValidityState, ref?: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | null): import("react/jsx-runtime").JSX.Element | null; /** @internal */ interface FormFieldValidationProps { ariaProps: Pick; onInvalid: (event: ReactFormEvent) => void; onChange: (event?: ChangeEvent) => void; onBlur: (event?: FocusEvent) => void; } /** * Hook to generate ARIA props based on the form field messages * @param ariaLabelingProps - ARIA labeling properties * @returns ARIA props for the form field * @internal */ export declare function useFormFieldValidationAriaProps(ariaLabelingProps?: AriaLabelingProps): { 'aria-describedby': string | undefined; "aria-errormessage"?: string | undefined | undefined; "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined; 'aria-label'?: string; 'aria-labelledby'?: string; 'aria-details'?: string; }; /** * @param ref - Reference to the input element * @param validationDeps - Values that trigger re-validation when changed (e.g., [required, min, max, pattern]). * @param ariaLabelingProps - ARIA labeling properties * @param controlId - Optional control ID for message management * @internal */ export declare function useFormFieldValidation(ref: RefObject, validationDeps?: Record, ariaLabelingProps?: AriaLabelingProps, controlId?: string): FormFieldValidationProps; export declare function getCombinedAriaProps(validationAriaProps: Pick, labelingProps: AriaLabelingProps): { 'aria-describedby': string | undefined; "aria-errormessage"?: string | undefined | undefined; "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined; 'aria-label'?: string; 'aria-labelledby'?: string; 'aria-details'?: string; }; export {};