import { AlertItem } from "../components/ez-alert-list/ez-alert-list"; import { DialogType } from "../components/ez-dialog/DialogType"; import { SlotBuilder } from "../components/ez-list/ez-list"; import { THeightMode } from "../components/ez-modal/ez-modal"; import { TFunction } from 'i18next'; export default class ApplicationUtils { static i18n: TFunction; private static getDefaultMessageOptions; private static defaultModalProps; private static defaultAlertListProps; private static showDialog; static alert(title: string, message: string, icon?: string, options?: MessageOptions): Promise; static error(title: string, message: string, icon?: string, options?: MessageOptions): Promise; static success(title: string, message: string, icon?: string, options?: MessageOptions): Promise; static confirm(title: string, message: string, icon?: string, dialogType?: DialogType, options?: MessageOptions): Promise; static message(title: string, message: string, icon?: string, options?: MessageOptions): Promise; static info(message: string, options?: MessageOptions): Promise; private static isModalContent; /** * Exibe um popup configurado com os parâmetros informados e retorna um callBack * para removêlo da DOM quando necessário. * * @param popupProps */ static showPopup(popupProps: IPopupProps): Promise; static showModal(modalProps: IModalProps): Promise; static showAlerts(props: IAlertListProps): void; } export interface IModalProps { content: HTMLElement | string; position?: "left" | "right"; size?: string; heightMode?: keyof THeightMode; closeOutsideClick?: boolean; closeEsc?: boolean; useScrimLight?: boolean; } export interface IPopupProps { content: HTMLElement | string; size?: string; title?: string; } export interface MessageOptions { canClose?: boolean; labelCancel?: string; labelConfirm?: string; btnConfirmDanger?: boolean; iconName?: string; beforeClose?: Function; } export interface IAlertListProps { alerts: Array; itemRightSlotBuilder?: SlotBuilder; enableDragAndDrop?: boolean; enableExpand?: boolean; opened?: boolean; }