import React, { PropsWithChildren } from 'react';
import type { FormProps, FormItemProps, FormInstance } from 'antd/es/form';
import type { SubmitterProps } from '../wau-form/components/Submitter';
import type { GroupProps, FieldProps } from '../wau-form/interface';
import './style';
export type CommonFormProps<T extends Record<string, any> = Record<string, any>> = PropsWithChildren<{
    submitter?: SubmitterProps<{
        form?: FormInstance<any>;
    }> | false;
    /**
     * 支持异步操作，更加方便
     *
     * @name 表单结束后调用
     */
    onFinish?: (formData: T) => Promise<boolean | void>;
    /** @name 获取真正的可以获得值的 from */
    formRef?: React.MutableRefObject<FormInstance | undefined>;
    /** @name 同步结果到 url 中 */
    syncToUrl?: true | ((values: T, type: 'get' | 'set') => T);
    /**
     * 如果为 false,会原样保存。
     *
     * @default true
     * @param 要不要值中的 Null 和 undefined
     */
    omitNil?: boolean;
    /** 是否回车提交 */
    isKeyPressSubmit?: boolean;
    /**
     * 重置表单时是否清空表单内的数据
     */
    clearOnReset?: boolean;
}>;
export type BaseFormProps<T extends Record<string, any> = Record<string, any>> = {
    contentRender?: (items: React.ReactNode[], submitter: React.ReactElement<SubmitterProps> | undefined, form: FormInstance<any>) => React.ReactNode;
    fieldProps?: FieldProps;
    onInit?: (values: T) => void;
    dateFormatter?: 'number' | 'string' | false;
    formItemProps?: FormItemProps;
    groupProps?: GroupProps;
    /** 是否回车提交 */
    isKeyPressSubmit?: boolean;
} & Omit<FormProps, 'onFinish'> & CommonFormProps<T>;
declare function BaseForm<T extends Record<string, any> = Record<string, any>>(props: BaseFormProps<T>): import("react/jsx-runtime").JSX.Element;
export type { FormProps, FormItemProps, FormInstance };
export default BaseForm;
