import { LiveAnnouncer } from '@angular/cdk/a11y'; import { BreakpointObserver } from '@angular/cdk/layout'; import { ComponentType, Overlay } from '@angular/cdk/overlay'; import { EmbeddedViewRef, InjectionToken, Injector, OnDestroy, TemplateRef, Type } from '@angular/core'; import { SbbNotificationToastConfig } from './notification-toast-config'; import { SbbNotificationToastContainer } from './notification-toast-container.component'; import { SbbNotificationToastRef } from './notification-toast-ref'; import { SbbTextOnlyNotificationToast } from './simple-notification.component'; /** Injection token that can be used to specify default notification toast. */ export declare const SBB_NOTIFICATION_TOAST_DEFAULT_OPTIONS: InjectionToken>; /** @docs-private */ export declare function SBB_NOTIFICATION_TOAST_DEFAULT_OPTIONS_FACTORY(): SbbNotificationToastConfig; /** Service to dispatch notification toast messages. */ export declare class SbbNotificationToast implements OnDestroy { private _overlay; private _injector; private _live; private _breakpointObserver; private _parentNotification; private _defaultConfig; /** * Reference to the current notification toast in the view *at this level* (in the Angular injector tree). * If there is a parent notification toast service, all operations should delegate to that parent * via `_openednotification toastRef`. */ private _notificationRefAtThisLevel; /** The component that should be rendered as the notification toast's simple component. */ protected _simpleNotificationToastComponent: Type; /** The container component that attaches the provided template or component. */ protected _notificationToastContainerComponent: Type; /** The CSS class to applie for mobile mode. */ protected _mobileDeviceCssClass: string; /** Reference to the currently opened notification toast at *any* level. */ get _openedNotificationRef(): SbbNotificationToastRef | null; set _openedNotificationRef(value: SbbNotificationToastRef | null); constructor(_overlay: Overlay, _injector: Injector, _live: LiveAnnouncer, _breakpointObserver: BreakpointObserver, _parentNotification: SbbNotificationToast, _defaultConfig: SbbNotificationToastConfig); /** * Creates and dispatches a notification toast with a custom component for the content, removing any * currently opened notification toasts. * * @param component Component to be instantiated. * @param config Extra configuration for the notification toast. */ openFromComponent(component: ComponentType, config?: SbbNotificationToastConfig): SbbNotificationToastRef; /** * Creates and dispatches a notification toast with a custom template for the content, removing any * currently opened notification toasts. * * @param template Template to be instantiated. * @param config Extra configuration for the notification toast. */ openFromTemplate(template: TemplateRef, config?: SbbNotificationToastConfig): SbbNotificationToastRef>; /** * Opens a notification toast with a message and an optional action. * @param message The message to show in the notification toast. * @param action The label for the notification toast action. * @param config Additional configuration options for the notification toast. */ open(message: string, config?: SbbNotificationToastConfig): SbbNotificationToastRef; /** Dismisses the currently-visible notification toast. */ dismiss(): void; ngOnDestroy(): void; /** Attaches the notification toast container component to the overlay. */ private _attachNotificationToastContainer; /** Places a new component or a template as the content of the notification toast container. */ private _attach; /** Animates the old notification toast out and the new one in. */ private _animateNotification; /** * Creates a new overlay and places it in the correct location. * @param config The user-specified notification toast config. */ private _createOverlay; /** * Creates an injector to be used inside of a notification toast component. * @param config Config that was used to create the notification toast. * @param notification toastRef Reference to the notification toast. */ private _createInjector; }