import type {
  ElMessageBoxOptions,
  MessageBoxData,
  MessageHandler,
  MessageParams,
} from 'element-plus';
import type { AppContext } from 'vue';

declare global {
  declare namespace ElMessageBox {
    function confirm(
      message: ElMessageBoxOptions['message'],
      options?: ElMessageBoxOptions,
      appContext?: AppContext | null
    ): Promise<MessageBoxData>;
    function confirm(
      message: ElMessageBoxOptions['message'],
      title: ElMessageBoxOptions['title'],
      options?: ElMessageBoxOptions,
      appContext?: AppContext | null
    ): Promise<MessageBoxData>;
  }
  declare function ElMessage(
    options?: MessageParams,
    appContext?: null | AppContext
  ): MessageHandler;
}
