import { SetupContext } from 'vue';
import type { FormEvents, FormProps } from './form';
import type { FormItemProps } from './form-item';
export interface IFormContext {
    props: FormProps;
    emit: SetupContext<FormEvents>['emit'];
    register: (IFormItemContext: any) => void;
    unregister: (IFormItemContext: any) => void;
}
export interface IFormItemContext extends FormItemProps {
    validate: (trigger?: string, showError?: boolean) => Promise<boolean>;
    clearValidate: () => void;
}
export interface IFormItemRule {
    required?: boolean;
    email?: boolean;
    min?: number;
    max?: number;
    maxlength?: number;
    pattern?: RegExp;
    validator?: (any: any) => Promise<boolean> | boolean;
    message: (() => string) | string;
    trigger: 'blur' | 'change';
}
