import { SwirlToastIntent } from "../swirl-toast/swirl-toast"; import { SwirlDialogToggleEvent } from "../../utils"; export type SwirlToastConfig = { accessibleDismissLabel?: string; content: string; actionLabel?: string; dismissOnAction?: boolean; dismissLabel?: string; duration?: number; icon?: string; intent?: SwirlToastIntent; toastId?: string; onDismiss?: (toastId: string) => void; onAction?: (toastId: string) => void; }; export type SwirlToastMessage = SwirlToastConfig & { createdAt: Date; toastId: string; }; export declare class SwirlToastProvider { el: HTMLSwirlToastProviderElement; globalDuration?: number; private toasts; private popoverEl; private activeDialogStack; private originalParent; /** * Clear all toasts * @param newToast * @returns */ clearAll(): Promise; /** * Dismiss a toast * @param toastId * @returns */ dismiss(toastId: string): Promise; /** * Create a new toast * @param newToast * @returns */ toast(newToast: SwirlToastConfig): Promise; componentWillLoad(): void; disconnectedCallback(): void; handleDialogToggle(event: CustomEvent): void; onToastsChange(): void; private onAction; private onDismiss; private onDialogOpen; private onDialogClose; /** * Ensures that the toasts are positioned inside dialogs when they are open. * * This is necessary to allow toasts to be interactable when a dialog is open, otherwise the toasts would be inert. */ private ensureCorrectPosition; render(): any; }