import { VChild } from '@gera2ld/jsx-dom'; import { IHostElementResult } from '../util'; export interface IToastOptions { /** * The duration for the toast to show. */ duration: number; /** * Whether to create the toast with ShadowDOM. * Note that CSS may not work with ShadowDOM in pages with strict CSP limits. */ shadow: boolean; /** * Apply built-in themes, default as `light`. * Available values are `light` and `dark`, any other value will disable the theme CSS. */ theme: string; /** * Additional className for the toast root element */ className?: string; /** * Additional CSS for the toast. * `:host` can be used to match the host element. */ style?: string | ((id: string) => string); /** * Hook before showing the toast, e.g. adding a fade-in transition. */ beforeEnter?: (result: IToastResult) => Promise; /** * Hook before closing the toast, e.g. adding a fade-out transition. */ beforeClose?: (result: IToastResult) => Promise; } export interface IToastResult extends IHostElementResult { body: HTMLElement; close: () => void; } export declare function showToast(content: VChild, options?: Partial): IToastResult;