import { OnChanges, EventEmitter, OnInit, SimpleChanges, OnDestroy } from "@angular/core"; import { Observable, PartialObserver, Subject } from "rxjs"; export declare type NotificationStyle = "slide-in" | "bar"; export declare type NotificationPosition = "bottom-left" | "bottom-right" | "top-left" | "top-right" | "top" | "bottom"; export declare type NotificationTheme = "purple" | "primary" | "danger" | "success" | "warning" | "inverted"; export interface NotificationAction { text: string; action: () => void; } /** An alert which pops up on the page to inform the user of an event which occured and optionally provide actions to perform. */ export declare class NotificationComponent implements OnChanges, OnInit, OnDestroy { /** Element class name */ className?: string; /** Property sets whether the notification is dismissable */ dismissable?: boolean; /** Interval for the notification to be dismissed, default 5s */ dismissTimeout?: number; /** Persist notification until dismissed (default: false) */ persist?: boolean; /** Notification position, "bottom-left" | "bottom-right" | "top-left" | "top-right" | "top" | "bottom" */ position?: NotificationPosition; /** Notification style, "slide-in" | "bar" */ style?: NotificationStyle; /** Notification theme, "purple" | "primary" | "danger" | "success" | "warning" | "inverted" */ theme?: NotificationTheme; /** Notification title */ title?: string; /** Notification content */ message?: string; /** Property sets whether the notification is toggled */ toggle: boolean; /** Display action buttons - max: 2 actions */ actions?: Array; /** Display progress bar based on time */ progress?: boolean; /** Callback when notification is clicked */ notificationClick?: EventEmitter; /** Callback when notification is dismissed */ dismiss?: EventEmitter; progressValue: number; notificationClassNames: string; private timerRef; isRunning: boolean; isPaused: boolean; isComplete: boolean; timer$: Observable; timerObserver: PartialObserver; pauseTimer$: Subject; stopTimer$: Subject; /** * Get the style class based on the theme passed through the props * @param {string} style The style passed through the props */ private getStyleClass; /** Get the theme class based on the theme passed though the props */ private getThemeClass; /** Get the position class based on the position and style passed through the props */ private getPositionClass; get progressValuePercentage(): number; /** Start the timer to dismiss the notification */ startTimer(): void; pauseTimer(): void; restartTimer(): void; stopTimer(): void; /** Dismiss the notification */ dismissNotification(): void; /** Clear the timer that dismisses the notification */ clearTimer(): void; setClassNames(): void; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; /** * Pause the notification timer when the mouse enters the notification */ mouseEnter(): void; /** * Resume the notification timer when the mouse leaves the notification */ mouseLeave(): void; ngOnDestroy(): void; }