/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { LitElement } from 'lit'; import { ToastPosition, ToastAnimation, ToastConfig } from './toast.types.js'; declare const NrToastElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & (new (...args: any[]) => import("packages/common/src/shared/base-mixin.js").LightDomContent) & typeof LitElement; /** * Toast notification component for displaying temporary messages. * * Provides a flexible notification system with multiple types, positions, and animations. * Supports stacking multiple toasts, auto-dismiss (enabled by default), action buttons, * custom HTML content, and manual closing. * * @example * ```html * * * * * * * * * ``` * * @fires nr-toast-show - Toast shown * @fires nr-toast-close - Toast closed * @fires nr-toast-click - Toast clicked * * @cssproperty --nuraly-z-index-toast - Toast z-index * @cssproperty --nuraly-toast-default-background - Default toast background * @cssproperty --nuraly-toast-success-background - Success toast background * @cssproperty --nuraly-toast-error-background - Error toast background * @cssproperty --nuraly-toast-warning-background - Warning toast background * @cssproperty --nuraly-toast-info-background - Info toast background * * @csspart container - The root list wrapper holding all visible toasts * @csspart toast - An individual toast element * @csspart icon - The leading icon container (when an icon is set) * @csspart content - The content area (text or custom html) * @csspart text - The text node (when not using custom content) * @csspart button - The action button wrapper (when a button is configured) * @csspart close - The close (×) button (when closable) */ export declare class NrToastElement extends NrToastElement_base { static useShadowDom: boolean; static styles: import("lit").CSSResult; requiredComponents: string[]; /** Position of toast container on screen */ position: ToastPosition; /** Maximum number of toasts to display */ maxToasts: number; /** Default duration for toasts in milliseconds */ defaultDuration: import("./toast.types.js").ToastDuration; /** Animation type for toasts */ animation: ToastAnimation; /** Whether to stack toasts or replace */ stack: boolean; /** Auto dismiss toasts after duration (default: true) */ autoDismiss: boolean; /** Internal state: active toasts */ private toasts; /** Timeout map for auto-dismiss */ private timeouts; /** * Show a new toast notification * @param config - Toast configuration * @returns Toast ID for manual control */ show(config: string | ToastConfig): string; /** * Show success toast */ success(text: string, duration?: number): string; /** * Show error toast */ error(text: string, duration?: number): string; /** * Show warning toast */ warning(text: string, duration?: number): string; /** * Show info toast */ info(text: string, duration?: number): string; /** * Remove a specific toast */ removeToast(id: string): void; /** * Clear all toasts */ clearAll(): void; /** * Handle toast click */ private handleToastClick; /** * Handle close button click */ private handleCloseClick; /** * Get default icon for toast type */ private getDefaultIcon; /** * Generate unique ID */ private generateId; /** * Get animation class */ private getAnimationClass; /** * Emit toast event */ private emitToastEvent; disconnectedCallback(): void; render(): import("lit-html").TemplateResult<1>; private renderToast; private renderButton; } export {}; //# sourceMappingURL=toast.component.d.ts.map