import '../alert/alert'; import type { ComponentSize, RoundedSize, ThemeColor } from '../../types'; export type OreToastEvents = { add: { id: string; }; dismiss: { id: string; }; }; export type OreToastProps = { max?: number; position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; }; /** Individual toast notification. */ export type ToastItem = { actions?: Array<{ color?: ThemeColor; label: string; onClick?: () => void; variant?: 'solid' | 'flat' | 'bordered'; }>; color?: ThemeColor; dismissible?: boolean; /** Auto-dismiss delay in ms. Set to 0 for persistent toasts (default: 5000). */ duration?: number; heading?: string; /** Show message and actions side-by-side (horizontal layout). */ horizontal?: boolean; /** Auto-generated when omitted. */ id?: string; message: string; /** Metadata text (for example, a timestamp) shown in the alert meta slot. */ meta?: string; /** Called after the toast is fully dismissed and removed. */ onDismiss?: () => void; rounded?: RoundedSize | ''; size?: ComponentSize; /** * Screen-reader announcement urgency. Error-coloured toasts are assertive by * default; all other toasts are polite. */ urgency?: 'polite' | 'assertive'; variant?: 'solid' | 'flat' | 'bordered'; }; export declare const TOAST_TAG: "ore-toast"; export type ToastServiceConfig = OreToastProps; export interface ToastService { add(item: ToastItem): string; clear(): void; configure(config: ToastServiceConfig): void; dismiss(id: string): void; readonly disposalSignal: AbortSignal; dispose(): void; readonly disposed: boolean; error(message: string, opts?: Partial): string; info(message: string, opts?: Partial): string; promise(promise: Promise, messages: { error: string | ((err: unknown) => string); loading: string; success: string | ((data: T) => string); }): Promise; success(message: string, opts?: Partial): string; update(id: string, updates: Partial): void; warning(message: string, opts?: Partial): string; [Symbol.dispose](): void; } /** * Creates a scoped toast service. The service owns its notification store and * binds it to the declarative `` host inside `root`, creating that * host lazily when notifications are first requested. */ export declare function createToastService(root?: ParentNode): ToastService; /** Singleton service backed by a lazily created host in `document.body`. */ export declare const toast: ToastService; //# sourceMappingURL=toast.d.ts.map