import { MmDialog } from './dialog' import { MmAlertFactory, AlertParams } from './alert.factory' import { MmPromptFactory, PromptParams } from './prompt.factory' import { MmConfirmFactory, ConfirmParams } from './confirm.factory' export interface close { (cancel: boolean): void } export interface beforeClose { (close: close): void } /** Dialog component */ export declare interface DialogParams { /** Dialog title */ title?: string /** Dialog unique id */ id?: string /** mount target */ target?: string | boolean | null | Element /** Dialog content */ message: string /** Message string is html or not */ messageIsHtml?: boolean /** Show close icon */ closable?: boolean /** Before close callback */ beforeClose?: beforeClose /** Lock scroll behavior */ lockScroll?: boolean /** Show cancel button or not */ showCancelButton?: boolean /** Show confirm button or not */ showConfirmButton?: boolean /** Cancel button's custom text */ cancelButtonText?: string /** Confirm button's custom text */ confirmButtonText?: string /** Click mask should close dialog or not */ maskClosable?: boolean /** Press esc should close dialog or not */ escClosable?: boolean /** Set custom class */ customClass?: string /** Set custom width */ width?: string /** Cancel callback */ onCancel?: () => 'cancel' | 'close' /** Confirm callback */ onConfirm?:(evt: MouseEvent) => any } export declare type DialogTypes = 'confirm' | 'alert' | 'prompt' type DialogTypedParams = T extends 'confirm' ? ConfirmParams : T extends 'alert' ? AlertParams : T extends 'prompt' ? PromptParams : never type DialogTypedReturn = T extends 'confirm' ? ReturnType : T extends 'alert' ? ReturnType : T extends 'prompt' ? ReturnType : never export declare interface MmDialogFactory { >(dialogType: T, options: S): DialogTypedReturn confirm: MmConfirmFactory alert: MmAlertFactory prompt: MmPromptFactory close: (id: string) => void closeAll: () => void }