import { ButtonProps } from '../button';
import { OverlayProps } from '../overlay';
import { TNode, Styles } from '../common';
export interface TdDialogProps {
    actions?: Array<ButtonProps>;
    beforeClose?: (trigger: 'confirm' | 'cancel' | 'overlay' | 'close-btn', context: {
        e: MouseEvent;
    }) => void | Promise<void>;
    buttonLayout?: 'horizontal' | 'vertical';
    cancelBtn?: string | ButtonProps | TNode | null;
    closeBtn?: boolean;
    closeOnOverlayClick?: boolean;
    confirmBtn?: string | ButtonProps | TNode | null;
    content?: string | TNode;
    destroyOnClose?: boolean;
    middle?: TNode;
    overlayProps?: OverlayProps;
    preventScrollThrough?: boolean;
    showOverlay?: boolean;
    title?: string | TNode;
    top?: TNode;
    visible?: boolean;
    width?: string | number;
    zIndex?: number;
    onCancel?: (context: {
        e: MouseEvent;
    }) => void;
    onClose?: (context: DialogCloseContext) => void;
    onClosed?: () => void;
    onConfirm?: (context: {
        e: MouseEvent;
    }) => void;
    onOverlayClick?: (context: {
        e: MouseEvent;
    }) => void;
}
export interface DialogOptions extends Omit<TdDialogProps, 'attach'> {
    className?: string;
    style?: string | Styles;
}
export interface DialogInstance {
    destroy: () => void;
    hide: () => void;
    show: () => void;
    update: (props: DialogOptions) => void;
}
export type DialogEventSource = 'cancel' | 'overlay' | 'close-btn';
export interface DialogCloseContext {
    trigger: DialogEventSource;
    e: MouseEvent;
}
export type DialogMethod = (options?: DialogOptions) => DialogInstance;
export type DialogConfirmMethod = (options?: DialogOptions) => DialogInstance;
export type DialogAlertMethod = (options?: Omit<DialogOptions, 'cancelBtn'>) => DialogInstance;
