type ToastVariant = "default" | "error" | "info" | "loading" | "success" | "warning"; type ToastPosition = "bottom-center" | "bottom-left" | "bottom-right" | "top-center" | "top-left" | "top-right"; type ToastAction = { label: string; onClick: () => void; }; type ToastOptions = { action?: ToastAction; description?: string; duration?: number; id?: string; onClose?: () => void; onRemove?: () => void; title?: string; variant?: ToastVariant; }; type ToastPromiseStateOption = { description?: string; duration?: number; title?: string; }; type ToastPromiseStateValue = ((data: T) => string | ToastPromiseStateOption) | ToastPromiseStateOption | string; type ToastPromiseOptions = { error: ToastPromiseStateValue; loading: string | ToastPromiseStateOption; success: ToastPromiseStateValue; }; type ToastManagerOptions = { defaultDuration?: number; limit?: number; }; type ToastManager = { readonly viewport: HTMLElement; add(options: ToastOptions): string; close(id: string): void; closeAll(): void; destroy(): void; dismiss(id?: string): void; getToasts(): ToastState[]; update(id: string, options: Partial): void; }; type ToastApi = { (message: string, options?: Omit): string; (options: ToastOptions): string; dismiss(id?: string): void; error(message: string, options?: Omit): string; info(message: string, options?: Omit): string; loading(message: string, options?: Omit): string; promise(promise: Promise, options: ToastPromiseOptions): Promise; success(message: string, options?: Omit): string; update(id: string, options: Partial): void; warning(message: string, options?: Omit): string; }; type ToastState = ToastOptions & { closing?: boolean; element?: HTMLElement; height?: number; id: string; managedDescribedBy?: string; managedLabelledBy?: string; removalTimerId?: number; swipeDirection?: SwipeDirection; swipeX?: number; swipeY?: number; timerDuration?: number; timerRemaining?: number; timerStartedAt?: number; swiping?: boolean; timeoutId?: number; }; type SwipeDirection = "down" | "left" | "right" | "up"; declare global { interface Window { __starwindRuntime__?: { toast?: ToastManager | null; [key: string]: unknown; }; } } declare function createToastManager(viewport: HTMLElement, options?: ToastManagerOptions): ToastManager; declare function getToastManager(): ToastManager | null; declare const createToast: ToastApi; export { type ToastAction, type ToastApi, type ToastManager, type ToastManagerOptions, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastPromiseStateOption, type ToastPromiseStateValue, type ToastState, type ToastVariant, createToastManager, getToastManager, createToast as toast };