import { OnChanges, OnDestroy, SimpleChanges, TemplateRef } from '@angular/core'; import * as i0 from "@angular/core"; export type AlertTone = 'success' | 'danger' | 'info' | 'warning'; export type AlertPosition = 'top' | 'bottom' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center'; export interface AlertComponentOptions { visible: boolean; message: string; type: AlertTone; duration?: number; onHide?: () => void; textColor?: string; position?: AlertPosition; isDarkMode?: boolean; alertStyle?: Partial; customTemplate?: TemplateRef; } export type AlertComponentType = (options: AlertComponentOptions) => HTMLElement; /** * AlertComponent - Toast-style notification component for success and error messages * * @component * @description * Displays toast-style alert messages with automatic dismiss timer and manual close option. * Supports three levels of customization: * 1. **Basic Usage**: Use default alert styles with custom message and type * 2. **Style Customization**: Override alert appearance with alertStyle prop * 3. **Full Override**: Provide a custom template via customTemplate for complete control * * Key Features: * - Auto-dismiss with configurable duration * - Success/danger type indicators * - Manual dismiss capability * - Customizable text color and styling * - Full template override support * * @example * Basic Usage: * ```html * * * ``` * * @example * Style Customization: * ```html * * * ``` * * @example * Custom Template Override: * ```html * * * * *
* * {{ message }} * *
*
* ``` * * @selector app-alert-component * @standalone true * @imports CommonModule * * @input visible - Whether the alert is currently visible. Default: `false` * @input message - The message text to display in the alert. Default: `''` * @input type - Alert type ('success' or 'danger') affecting color scheme. Default: `'success'` * @input duration - Auto-dismiss duration in milliseconds. Default: `4000` * @input textColor - Color of the message text. Default: `'black'` * @input onHide - Callback function invoked when alert is dismissed (auto or manual). Default: `undefined` * @input alertStyle - Custom CSS styles to apply to the alert container. Default: `undefined` * @input customTemplate - Custom TemplateRef to completely replace default alert template. Default: `undefined` * * @method ngOnChanges - Handles input changes and triggers auto-dismiss timer when visible * @method handlePress - Manually dismisses the alert by invoking onHide callback */ export declare class AlertComponent implements OnChanges, OnDestroy { visible: boolean; message: string; type: AlertTone; duration: number; textColor: string; position: AlertPosition; isDarkMode?: boolean; onHide: () => void; alertStyle?: Partial; customTemplate?: TemplateRef; alertType: AlertTone; private hideTimeout?; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; handlePress(): void; get alertLabel(): string; get alertMeta(): string; get alertIcon(): string; get alertRole(): 'alert' | 'status'; get shellStyle(): Record; get resolvedIsDarkMode(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }