import type { ReactiveController } from 'lit'; import type { Bag } from '../../../../../Types/Bag'; import type { Nullable } from '../../../../../Types/Nullable'; import type { Tuple } from '../../../../../Types/Tuple'; /** * @public */ export type ElementValidationMessageResolver = (params: Bag) => string; /** * @public */ export type ElementValidatorFn = (host: T) => IElementValidator; /** * @public */ export type ElementValidationKey = keyof ValidityStateFlags; export type ElementValidationError = Partial>>; /** * @public */ export type ElementValidationResult = Tuple, Nullable>; /** * @public */ export interface IElementValidator extends Pick { /** * Method that performs synchronous validation against the provided control. * * @param control - The control to validate against. * @returns A map of validation errors if validation fails, otherwise null. */ validate(): Nullable; /** * Registers a callback function to call when the validator inputs change. * * @param fn - The callback function */ registerOnValidatorChange?(fn: (value: unknown) => void): void; } //# sourceMappingURL=IElementValidator.d.ts.map