import { Observable } from 'rxjs';
import { ValidatorError } from '../errors/validator-error';
export type ValidatorFn = (value: any) => (boolean);
export type AsyncValidatorFn = (value: any) => (Promise<boolean> | Observable<boolean>);
export declare enum ValidatorId {
    required = "required",
    minLength = "minLength",
    maxLength = "maxLength",
    min = "min",
    max = "max",
    pattern = "pattern",
    email = "email"
}
export interface IValidator {
    id?: string;
    isValid: AsyncValidatorFn | ValidatorFn;
    async: boolean;
    error: (value: any) => ValidatorError;
    setupElement?: (el: HTMLElement) => void;
}
export type ValidationErrors<TProperties> = {
    [key in keyof TProperties]: Array<ValidatorError>;
};
export interface ValidationUpdate {
    isValid: boolean;
    isValidating: boolean;
    errors: Array<ValidatorError>;
}
