import { Observable } from 'rxjs'; import * as _angular_core from '@angular/core'; import { OnInit } from '@angular/core'; import * as _angular_platform_browser from '@angular/platform-browser'; /** The different types of alerts. */ type TbxAlertType = "success" | "error" | "info" | "warning"; /** Models an application alert. */ interface TbxAlert { /** A unique identifier for the alert. */ id: number; /** The application alert type (success, warning, error, info, etc.). */ type: TbxAlertType; /** The application alert message to display. */ message: string; /** Time in milliseconds before the alert will dismiss */ dismissOnTimeout?: number; } /** * A service to add application level alerts to be displayed where the alert * component selector (tbx-alerts) is placed on the page. */ declare class TbxAlertsService { private alertSubject; /** * Gets an alert observable to which a caller can subscribe to be notified when * a new alert is added. * @returns An observable of to subscribe to for new alerts. */ getAlert(): Observable; /** * Adds an alert of type success. * @param message The message to display in the alert. * @param dismissOnTimeout Time in milliseconds the alert will close. */ success(message: string, dismissOnTimeout?: number): void; /** * Adds an alert of type error. * @param message The message to display in the alert. * @param dismissOnTimeout Time in milliseconds the alert will close. */ error(message: string, dismissOnTimeout?: number): void; /** * Adds an alert of type information. * @param message The message to display in the alert. * @param dismissOnTimeout Time in milliseconds the alert will close. */ info(message: string, dismissOnTimeout?: number): void; /** * Adds an alert of type warning. * @param message The message to display in the alert. * @param dismissOnTimeout Time in milliseconds the alert will close. */ warning(message: string, dismissOnTimeout?: number): void; /** * Adds an alert and notifies the subscribers. * @param type The type of alert. * @param message The message to display. * @param dismissOnTimeout Time in milliseconds the alert will close. */ alert(type: TbxAlertType, message: string, dismissOnTimeout?: number): void; /** Clears all the alerts currently being displayed. */ clearAll(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare class TbxAlertComponent implements OnInit { /** Sets the message to display. */ message: _angular_core.InputSignal; /** The type of alert to display {@link TbxAlertType} */ type: _angular_core.InputSignal; /** Indicates to dismiss the alert after n milliseconds */ dismissOnTimeout: _angular_core.InputSignal; /** Add additional classes to the default. */ class: _angular_core.InputSignal; hasMessage: _angular_core.Signal; displayMessage: _angular_core.Signal<_angular_platform_browser.SafeHtml>; show: _angular_core.WritableSignal; classes: _angular_core.Signal; typeClass: _angular_core.Signal<"success" | "info" | "warning" | "danger">; iconType: _angular_core.Signal<"check-circle" | "times-circle" | "exclamation-triangle" | "info-circle">; private readonly sanitizer; ngOnInit(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class TbxAlertsComponent { private readonly alertService; alerts: _angular_core.WritableSignal; constructor(alertService: TbxAlertsService); showAlert(alert: TbxAlert | null): void; removeAlert(alert: TbxAlert): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class TbxErrorAlertComponent { readonly message: _angular_core.InputSignal; readonly displayMessage: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class TbxSuccessAlertComponent { /** The error message to display. */ message: _angular_core.InputSignal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { TbxAlertComponent, TbxAlertsComponent, TbxAlertsService, TbxErrorAlertComponent, TbxSuccessAlertComponent }; export type { TbxAlert, TbxAlertType };