import { FactoryComponent } from 'mithril'; export interface ToastAction { /** Icon name for the action button */ icon?: string; /** Text label for the action button (if no icon provided) */ label?: string; /** Callback function called when action is clicked */ onclick: () => void; /** Whether to use flat button style (default) or icon button style */ variant?: 'flat' | 'icon'; } export interface ToastOptions { /** HTML content for the toast */ html?: string; /** Display length in milliseconds */ displayLength?: number; /** Animation in duration in milliseconds */ inDuration?: number; /** Animation out duration in milliseconds */ outDuration?: number; /** * Additional CSS classes * @deprecated Use className instead. This property will be removed in a future version. */ classes?: string; /** Additional CSS classes (preferred over deprecated 'classes' property) */ className?: string; /** Callback function called when toast is dismissed */ completeCallback?: () => void; /** Activation percentage for swipe dismissal */ activationPercent?: number; /** Optional action button (for simple confirmations or undo actions) */ action?: ToastAction; } export declare class Toast { el: HTMLElement; options: Required; private state; private static _toasts; private static _container; private static _draggedToast; private static defaults; constructor(options?: ToastOptions); static getInstance(el: HTMLElement): Toast | undefined; static _createContainer(): void; static _removeContainer(): void; static _onDragStart: (e: Event) => void; static _onDragMove: (e: Event) => void; static _onDragEnd: () => void; static _xPos(e: Event): number; static dismissAll(): void; _createToast(): HTMLElement; _animateIn(): void; _setTimer(): void; dismiss(): void; } export declare const toast: (options: ToastOptions) => Toast; export interface ToastComponentAttrs extends ToastOptions { /** Whether to show the toast */ show?: boolean; } export declare const ToastComponent: FactoryComponent;