/** * ZUI Toast Component * Lightweight notification that doesn't interrupt user */ import { Component } from '../../core/Component'; import type { BaseProps, Rect } from '../../core/types'; export interface ToastProps extends BaseProps { /** Toast message */ message: string; /** Icon path */ icon?: string; /** Duration in milliseconds (default 3000) */ duration?: number; /** Callback when toast is dismissed */ onDismiss?: () => void; } /** * Toast component for lightweight notifications * * Based on ZeppOS design: * - Appears at bottom of screen * - Auto-dismisses after duration * - Doesn't interrupt user interaction * * @example * ```ts * // Show toast * Toast.show({ * message: 'Settings saved', * icon: 'ic_check', * duration: 3000, * }); * * // Toast with callback * Toast.show({ * message: 'Connection failed', * onDismiss: () => retryConnection(), * }); * ``` */ export declare class Toast extends Component { readonly type = "Toast"; private backgroundWidget; private textWidget; private iconWidget; private dismissTimer; protected getDefaultProps(): Partial; protected calculateLayout(parentRect?: Rect): void; protected createWidgets(): void; protected updateWidgets(): void; protected destroyWidgets(): void; private startDismissTimer; private clearDismissTimer; /** * Dismiss the toast with animation */ dismiss(): void; /** * Show toast with enter animation */ protected onMount(): void; } /** * Show a toast notification */ export declare function showToast(props: ToastProps): Toast; /** * Dismiss current toast */ export declare function dismissToast(): void; /** * Clear all queued toasts */ export declare function clearToastQueue(): void; /** * Create a Toast component */ export declare function createToast(props: ToastProps): Toast; declare module './Toast' { namespace Toast { function show(props: ToastProps): Toast; function dismiss(): void; function clearQueue(): void; } } //# sourceMappingURL=Toast.d.ts.map