import { BaseProps, DirectionType } from '../_utils/props';
import React from 'react';
import FormInstance, { FormErrors, FormValues } from './form-instance';
export declare type Rule = {
    type?: 'string' | 'number' | 'boolean';
    message?: string;
    max?: number;
    min?: number;
    required?: boolean;
    enum?: any[];
    len?: number;
    pattern?: RegExp;
    transform?: (value: any) => any;
    validator?: (value: any) => boolean | Promise<boolean>;
    whitespace?: boolean;
};
export interface FormItemProps extends BaseProps {
    name?: string;
    required?: boolean;
    colon?: boolean;
    label?: React.ReactNode;
    rules?: Rule[];
    helper?: React.ReactNode;
    notice?: React.ReactNode;
    valuePropName?: string;
    valueGetter?: (...args: any[]) => any;
    labelCol?: number | {
        span: number;
        offset: number;
    };
    wrapperCol?: number | {
        span: number;
        offset: number;
    };
    children?: React.ReactNode;
}
export declare type FormLayout = DirectionType | 'inline';
export declare type ValidateTrigger = 'onChange' | 'onBlur' | 'onSubmit';
export interface FormOptionsProps {
    labelCol: number | {
        span: number;
        offset: number;
    };
    wrapperCol: number | {
        span: number;
        offset: number;
    };
    validateTrigger: ValidateTrigger;
    layout: FormLayout;
}
export interface FormProps extends BaseProps, Partial<FormOptionsProps>, React.PropsWithRef<JSX.IntrinsicElements['form']> {
    form?: FormInstance;
    initialValues?: FormValues;
    onFinish?: (values: FormValues) => void;
    onFinishFailed?: ({ values, errors }: {
        values: FormValues;
        errors: FormErrors;
    }) => void;
}
