/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import React from 'react';
import { IFormProps, Form } from '@formily/core';
import { ReactFC } from '@formily/react';
import { IMiddleware } from '@formily/shared';
import { DrawerProps, ThemeConfig } from 'antd';
type FormDrawerRenderer = React.ReactElement | ((form: Form) => React.ReactElement);
type DrawerTitle = string | number | React.ReactElement;
type EventType = React.KeyboardEvent<HTMLDivElement> | React.MouseEvent<HTMLDivElement | HTMLButtonElement>;
export interface IFormDrawer {
    forOpen(middleware: IMiddleware<IFormProps>): IFormDrawer;
    open(props?: IFormProps): Promise<any>;
    close(): void;
}
export interface IDrawerProps extends DrawerProps {
    onClose?: (e: EventType) => void | boolean;
    loadingText?: React.ReactNode;
}
export declare function FormDrawer(title: IDrawerProps, id: string, renderer: FormDrawerRenderer): IFormDrawer;
export declare function FormDrawer(title: IDrawerProps, id: FormDrawerRenderer): IFormDrawer;
export declare function FormDrawer(title: DrawerTitle, id: string, renderer: FormDrawerRenderer): IFormDrawer;
export declare function FormDrawer(title: IDrawerProps, id: string, renderer: FormDrawerRenderer, theme: ThemeConfig): IFormDrawer;
export declare function FormDrawer(title: DrawerTitle, id: FormDrawerRenderer): IFormDrawer;
export declare namespace FormDrawer {
    var Extra: ReactFC;
    var Footer: ReactFC;
    var Portal: ReactFC<import("../__builtins__").IPortalProps>;
}
export default FormDrawer;
