interface ToastOptions { "id"?: string; "message"?: string; "status"?: "success" | "error" | "warning" | "info"; "description"?: string; "duration"?: number; "position"?: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end"; "message-icon"?: string; "view-button"?: boolean; "close-button"?: boolean; "remove-after-close"?: boolean; } interface ToastEvents { bcmToastView?: (event: any) => void; bcmToastClose?: (event: any) => void; bcmToastOpen?: (event: any) => void; } export declare class Toast { element: any; options: ToastOptions & ToastEvents; /** * Creates an instance of Toast. * @param {ToastOptions & ToastEvents} [options={}] * @example * const toast = new Toast(); * @example * const toast = new Toast({ * id: "my-toast", * message: "Hello World", * status: "success", * description: "This is a description", * duration: 5000, * position: "top", * "message-icon": "check", * "view-button": true, * "close-button": true, * "remove-after-close": true, // This will remove the toast from the DOM after it is closed * bcmToastView: (event) => { * // This Event fires when the view button is clicked * // do something * }, * bcmToastClose: (event) => { * // This Event fires when the toast is closed * // do something * }, * bcmToastOpen: (event) => { * // This Event fires when the toast is opened * // do something * } * }); * toast.show(); */ constructor(options: ToastOptions & ToastEvents); private createElement; private listeners; private setAttributes; /** * Shows the toast * @returns {HTMLElement} The element that was shown * @example * const toast = new Toast(); * toast.show(); * @example * const toast = new Toast(); * toast.show().then(() => { * // do something * }); * @example * const toast = new Toast(); * toast.show().then(() => { * // do something * }).catch(() => { * // do something else * }); */ show(): any; /** * Hides the toast * @returns {HTMLElement} The element that was hidden * @example * const toast = new Toast(); * toast.hide(); * @example * const toast = new Toast(); * toast.hide().then(() => { * // do something * }); * @example * const toast = new Toast(); * toast.hide().then(() => { * // do something * }).catch(() => { * // do something else * }); */ hide(): any; } export {}; //# sourceMappingURL=toast.d.ts.map