import React from 'react';
import { Form, IFormProps, IMiddleware, ReactFC } from '@tachybase/schema';
import { ModalProps, ThemeConfig } from 'antd';
type FormDialogRenderer = React.ReactElement | ((form: Form) => React.ReactElement);
type ModalTitle = string | number | React.ReactElement;
export interface IFormDialog {
    forOpen(middleware: IMiddleware<IFormProps>): IFormDialog;
    forConfirm(middleware: IMiddleware<Form>): IFormDialog;
    forCancel(middleware: IMiddleware<Form>): IFormDialog;
    open(props?: IFormProps): Promise<any>;
    close(): void;
}
export interface IModalProps extends ModalProps {
    onOk?: (event: React.MouseEvent<HTMLElement>) => void | boolean;
    onCancel?: (event: React.MouseEvent<HTMLElement>) => void | boolean;
    loadingText?: React.ReactNode;
}
export declare function FormDialog(title: IModalProps, id: string, renderer: FormDialogRenderer): IFormDialog;
export declare function FormDialog(title: IModalProps, renderer: FormDialogRenderer): IFormDialog;
export declare function FormDialog(title: IModalProps, renderer: FormDialogRenderer, theme: ThemeConfig): IFormDialog;
export declare function FormDialog(title: ModalTitle, id: string, renderer: FormDialogRenderer): IFormDialog;
export declare function FormDialog(title: ModalTitle, renderer: FormDialogRenderer): IFormDialog;
export declare function FormDialog(title: ModalTitle, renderer: FormDialogRenderer, theme: ThemeConfig): IFormDialog;
export declare namespace FormDialog {
    var Footer: ReactFC;
    var Portal: ReactFC<import("../__builtins__").IPortalProps>;
}
export default FormDialog;
