import { VNode } from 'vue';
import { Recordable, RenderOpts } from '@maxax/types';
import { ButtonProps } from 'naive-ui';
import { BasicEditBatchComponentProps, BasicEditBatchComponentType } from './component';
import { BasicEditBatchHelpComponentProps } from './help';
export interface BasicEditBatchProps {
    name?: string;
    schemas?: EditBatchSchema[];
    mergeDynamicData?: Recordable;
    size?: 'small' | 'medium' | 'large';
    disabled?: boolean;
    readonly?: boolean;
    fieldMapToTime?: BasicEditBatchFieldMapToTime;
    autoSetPlaceHolder?: boolean;
    resetFunc?: () => Promise<void>;
    submitFunc?: () => Promise<void>;
    transformDateFunc?: (date: any) => string;
    above?: boolean;
    submitOnReset?: boolean;
    resetButtonOptions?: Partial<ButtonProps>;
    submitButtonOptions?: Partial<ButtonProps>;
    dynamicDisabled?: boolean | (() => boolean);
}
interface BaseEditBatchSchema<T extends BasicEditBatchComponentType = any> {
    field: string;
    fields?: string[];
    changeEvent?: string;
    valueField?: string;
    label?: string | VNode | ((renderCallbackParams: EditBatchRenderCallbackParams) => string | VNode);
    subLabel?: string;
    helpMessage?: string | string[] | ((renderCallbackParams: EditBatchRenderCallbackParams) => string | string[]);
    helpComponentProps?: Partial<BasicEditBatchHelpComponentProps>;
    componentProps?: ((opt: {
        schema: EditBatchSchema;
        editBatchActionType: EditBatchActionType;
        formModel: Recordable;
        setFormModel: (key: string, value: any, schema: BasicEditBatchSchema) => void;
    }) => BasicEditBatchComponentProps[T]) | BasicEditBatchComponentProps[T];
    suffix?: string | number | VNode | ((renderCallbackParams: EditBatchRenderCallbackParams) => string | VNode | number);
    prefix?: string | number | VNode | ((renderCallbackParams: EditBatchRenderCallbackParams) => string | VNode | number);
    defaultValue?: any;
    defaultValueObj?: {
        [key: string]: any;
    };
    isHandleDateDefaultValue?: boolean;
    isHandleDefaultValue?: boolean;
    span?: number;
    ifShow?: boolean | ((renderCallbackParams: EditBatchRenderCallbackParams) => boolean);
    show?: boolean | ((renderCallbackParams: EditBatchRenderCallbackParams) => boolean);
    render?: (renderCallbackParams: EditBatchRenderCallbackParams, opts: RenderOpts) => VNode | VNode[] | string;
    renderColContent?: (renderCallbackParams: EditBatchRenderCallbackParams, opts: RenderOpts) => VNode | VNode[] | string;
    renderComponentContent?: ((renderCallbackParams: EditBatchRenderCallbackParams, opts: RenderOpts) => any) | VNode | VNode[] | string;
    customRenderComponent?: ((renderCallbackParams: EditBatchRenderCallbackParams, opts: RenderOpts) => any) | VNode | VNode[] | string;
    slot?: string;
    colSlot?: string;
    dynamicDisabled?: boolean | ((renderCallbackParams: EditBatchRenderCallbackParams) => boolean);
    dynamicReadonly?: boolean | ((renderCallbackParams: EditBatchRenderCallbackParams) => boolean);
    valueFormat?: (arg: Partial<EditBatchRenderCallbackParams> & {
        value: any;
    }) => any;
}
export interface ComponentEditBatchSchema<T extends BasicEditBatchComponentType = any> extends BaseEditBatchSchema<T> {
    component: T;
}
export interface SlotEditBatchSchema extends BaseEditBatchSchema {
    slot: string;
}
type ComponentEditBatchSchemaType<T extends BasicEditBatchComponentType = BasicEditBatchComponentType> = T extends any ? ComponentEditBatchSchema<T> : never;
export type EditBatchSchema = ComponentEditBatchSchemaType | SlotEditBatchSchema;
export type BasicEditBatchSchema = Partial<ComponentEditBatchSchema> & Partial<SlotEditBatchSchema> & BaseEditBatchSchema;
export interface EditBatchActionType {
    submit: () => Promise<void>;
    updateSchema: (data: Partial<BasicEditBatchSchema> | Array<Partial<BasicEditBatchSchema>>) => Promise<void>;
    resetSchema: (data: Partial<BasicEditBatchSchema> | Array<Partial<BasicEditBatchSchema>>) => Promise<void>;
    removeSchemaByField: (field: string | string[]) => Promise<void>;
    appendSchemaByField: (schema: BasicEditBatchSchema | BasicEditBatchSchema[], prefixField?: string, first?: boolean | undefined) => Promise<void>;
    setProps: (editBatchProps: Partial<BasicEditBatchProps>) => Promise<void>;
    resetFields: () => Promise<void>;
    setFieldsValue: (values: Recordable) => Promise<void>;
    getFieldsValue: () => Recordable;
}
export interface EditBatchRenderCallbackParams {
    schema: BasicEditBatchSchema;
    values: Recordable;
    model: Recordable;
    field: string;
}
export type BasicEditBatchFieldMapToTime = Array<[string, [string, string], (string | [string, string])?]>;
export interface BasicEditBatchEmitType {
    (_e: 'advanced-change', isAdvanced: boolean): void;
    (_e: 'reset', values: Recordable): void;
    (_e: 'submit', values: Recordable, key?: string, schema?: BasicEditBatchSchema): void;
    (_e: 'fieldValueChange', key: string, value: any, schema: BasicEditBatchSchema): void;
}
export {};
//# sourceMappingURL=edit-batch.d.ts.map