import React from 'react';
import type { StepsProps } from 'antd/es/steps';
import type { FormInstance, FormProps } from 'antd/es/form';
import type { FormProviderProps } from 'antd/es/form/context';
import type { ProFormProps } from '../wau-form';
import type { SubmitterProps } from '../wau-form/components/Submitter';
import type { CommonFormProps } from '../wau-base-form';
export type StepsFormProps<T extends Record<string, any> = Record<string, any>> = {
    /**
     * 返回 true 会重置步数，并且清空表单
     *
     * @name 提交方法
     */
    onFinish?: (values: T) => Promise<boolean | void>;
    current?: number;
    stepsProps?: StepsProps;
    formProps?: ProFormProps<T>;
    onCurrentChange?: (current: number) => void;
    /** 自定义步骤器 */
    stepsRender?: (steps: {
        key: string;
        title?: React.ReactNode;
    }[], defaultDom: React.ReactNode) => React.ReactNode;
    /** @name 当前展示表单的 formRef */
    formRef?: React.MutableRefObject<FormInstance<any> | undefined>;
    /** @name 所有表单的 formMapRef */
    formMapRef?: React.MutableRefObject<React.MutableRefObject<FormInstance<any> | undefined>[]>;
    /**
     * 自定义单个表单
     *
     * @param form From 的 dom，可以放置到别的位置
     */
    stepFormRender?: (from: React.ReactNode) => React.ReactNode;
    /**
     * 自定义整个表单区域
     *
     * @param form From 的 dom，可以放置到别的位置
     * @param submitter 操作按钮
     */
    stepsFormRender?: (from: React.ReactNode, submitter: React.ReactNode) => React.ReactNode;
    /** 按钮的统一配置，优先级低于分布表单的配置 */
    submitter?: SubmitterProps<{
        step: number;
        onPre: () => void;
        form?: FormInstance<any>;
    }> | false;
    containerStyle?: React.CSSProperties;
} & FormProviderProps;
export type StepFormProps<T extends Record<string, any> = Record<string, any>> = {
    step?: number;
} & Omit<FormProps<T>, 'onFinish'> & Omit<CommonFormProps<T>, 'submitter'>;
