{"version":3,"file":"notification-toast.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/notification-toast/notification-toast-config.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/notification-toast/notification-toast-animations.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/notification-toast/notification-toast-container.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/notification-toast/notification-toast-container.html","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/notification-toast/notification-toast-ref.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/notification-toast/simple-notification.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/notification-toast/simple-notification.html","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/notification-toast/notification-toast.module.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/notification-toast/notification-toast.ts"],"sourcesContent":["import { AriaLivePoliteness } from '@angular/cdk/a11y';\nimport { InjectionToken, ViewContainerRef } from '@angular/core';\nimport { SbbNotificationType } from '@sbb-esta/angular/notification';\n\n/** Injection token that can be used to access the data that was passed into a notification toast. */\nexport const SBB_NOTIFICATION_TOAST_DATA = new InjectionToken<any>('SbbNotificationToastData');\n\n/** Possible values for verticalPosition on SbbNotificationToastConfig. */\nexport type SbbNotificationToastVerticalPosition = 'top' | 'bottom';\n\nexport class SbbNotificationToastConfig<D = any> {\n  /** The politeness level for the AriaLiveAnnouncer announcement. */\n  politeness?: AriaLivePoliteness = 'assertive';\n\n  /**\n   * Message to be announced by the LiveAnnouncer. When opening a notification without a custom\n   * component or template, the announcement message will default to the specified message.\n   */\n  announcementMessage?: string;\n\n  /**\n   * The view container that serves as the parent for the notification for the purposes of dependency\n   * injection. Note: this does not affect where the notification is inserted in the DOM.\n   */\n  viewContainerRef?: ViewContainerRef;\n\n  /** The length of time in milliseconds to wait before automatically dismissing the notification. */\n  duration?: number = 0;\n\n  /** Extra CSS classes to be added to the notification container. */\n  panelClass?: string | string[];\n\n  /** Data being injected into the child component. */\n  data?: D | null = null;\n\n  /** Possible values for the notification's vertical position. */\n  verticalPosition?: SbbNotificationToastVerticalPosition = 'bottom';\n\n  /** The notification type */\n  type?: SbbNotificationType = 'success';\n}\n","import {\n  animate,\n  AnimationTriggerMetadata,\n  state,\n  style,\n  transition,\n  trigger,\n} from '@angular/animations';\n\nexport const SBB_NOTIFICATION_TOAST_ANIMATIONS: {\n  readonly notificationState: AnimationTriggerMetadata;\n} = {\n  /** Animation that shows and hides a notification toast. */\n  notificationState: trigger('state', [\n    state(\n      'void, hidden',\n      style({\n        transform: 'scale(0.8)',\n        opacity: 0,\n      }),\n    ),\n    state(\n      'visible',\n      style({\n        transform: 'scale(1)',\n        opacity: 1,\n      }),\n    ),\n    transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n    transition(\n      '* => void, * => hidden',\n      animate(\n        '75ms cubic-bezier(0.4, 0.0, 1, 1)',\n        style({\n          opacity: 0,\n        }),\n      ),\n    ),\n  ]),\n};\n","import { AnimationEvent } from '@angular/animations';\nimport {\n  BasePortalOutlet,\n  CdkPortalOutlet,\n  ComponentPortal,\n  DomPortal,\n  TemplatePortal,\n} from '@angular/cdk/portal';\nimport {\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ComponentRef,\n  Directive,\n  ElementRef,\n  EmbeddedViewRef,\n  NgZone,\n  OnDestroy,\n  ViewChild,\n  ViewEncapsulation,\n} from '@angular/core';\nimport { SbbIcon } from '@sbb-esta/angular/icon';\nimport { Observable, Subject } from 'rxjs';\n\nimport { SBB_NOTIFICATION_TOAST_ANIMATIONS } from './notification-toast-animations';\nimport { SbbNotificationToastConfig } from './notification-toast-config';\n\n/**\n * Base class for notification toast container.\n * @docs-private\n */\n@Directive()\nexport abstract class SbbNotificationToastContainerBase\n  extends BasePortalOutlet\n  implements OnDestroy\n{\n  private _destroyed = false;\n\n  /** The portal outlet inside of this container into which the notification toast content will be loaded. */\n  @ViewChild(CdkPortalOutlet, { static: true }) _portalOutlet: CdkPortalOutlet;\n\n  /** Subject for notifying that the notification toast has exited from view. */\n  readonly _onExit: Subject<void> = new Subject<void>();\n\n  /** Subject for notifying that the notification toast has finished entering the view. */\n  readonly _onEnter: Subject<void> = new Subject<void>();\n\n  /** The state of the notification toast animations. */\n  _animationState: string = 'void';\n\n  /** ARIA role for the notification toast container. */\n  _role: 'alert' | 'status' | null;\n\n  get _svgIcon() {\n    switch (this.config.type) {\n      case 'success':\n        return 'tick-small';\n      case 'error':\n      case 'warn':\n        return 'sign-exclamation-point-small';\n      default:\n        return 'circle-information-small';\n    }\n  }\n\n  constructor(\n    private _ngZone: NgZone,\n    protected _elementRef: ElementRef<HTMLElement>,\n    private _changeDetectorRef: ChangeDetectorRef,\n    public config: SbbNotificationToastConfig,\n  ) {\n    super();\n\n    // Based on the ARIA spec, `alert` and `status` roles have an\n    // implicit `assertive` and `polite` politeness respectively.\n    if (config.politeness === 'assertive' && !config.announcementMessage) {\n      this._role = 'alert';\n    } else if (config.politeness === 'off') {\n      this._role = null;\n    } else {\n      this._role = 'status';\n    }\n  }\n\n  /** Attach a component portal as content to this notification toast container. */\n  attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n    this._assertNotAttached();\n    const result = this._portalOutlet.attachComponentPortal(portal);\n    this._afterPortalAttached();\n    return result;\n  }\n\n  /** Attach a template portal as content to this notification toast container. */\n  attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n    this._assertNotAttached();\n    const result = this._portalOutlet.attachTemplatePortal(portal);\n    this._afterPortalAttached();\n    return result;\n  }\n\n  /**\n   * Attaches a DOM portal to the notification toast container.\n   * @deprecated To be turned into a method.\n   * @breaking-change 10.0.0\n   */\n  override attachDomPortal = (portal: DomPortal) => {\n    this._assertNotAttached();\n    const result = this._portalOutlet.attachDomPortal(portal);\n    this._afterPortalAttached();\n    return result;\n  };\n\n  /** Handle end of animations, updating the state of the notification toast. */\n  onAnimationEnd(event: AnimationEvent) {\n    const { fromState, toState } = event;\n\n    if ((toState === 'void' && fromState !== 'void') || toState === 'hidden') {\n      this._completeExit();\n    }\n\n    if (toState === 'visible') {\n      // Note: we shouldn't use `this` inside the zone callback,\n      // because it can cause a memory leak.\n      const onEnter = this._onEnter;\n\n      this._ngZone.run(() => {\n        onEnter.next();\n        onEnter.complete();\n      });\n    }\n  }\n\n  /** Begin animation of notification toast entrance into view. */\n  enter(): void {\n    if (!this._destroyed) {\n      this._animationState = 'visible';\n      // _animationState lives in host bindings and `detectChanges` does not refresh host bindings\n      // so we have to call `markForCheck` to ensure the host view is refreshed eventually.\n      this._changeDetectorRef.markForCheck();\n      this._changeDetectorRef.detectChanges();\n    }\n  }\n\n  /** Begin animation of the notification toast exiting from view. */\n  exit(): Observable<void> {\n    // It's common for notification toasts to be opened by random outside calls like HTTP requests or\n    // errors. Run inside the NgZone to ensure that it functions correctly.\n    this._ngZone.run(() => {\n      // Note: this one transitions to `hidden`, rather than `void`, in order to handle the case\n      // where multiple notification toasts are opened in quick succession (e.g. two consecutive calls to\n      // `SbbNotificationToast.open`).\n      this._animationState = 'hidden';\n      this._changeDetectorRef.markForCheck();\n\n      // Mark this element with an 'exit' attribute to indicate that the notification toast has\n      // been dismissed and will soon be removed from the DOM. This is used by the notification toast\n      // test harness.\n      this._elementRef.nativeElement.setAttribute('sbb-exit', '');\n    });\n\n    return this._onExit;\n  }\n\n  /** Makes sure the exit callbacks have been invoked when the element is destroyed. */\n  ngOnDestroy() {\n    this._destroyed = true;\n    this._completeExit();\n  }\n\n  /**\n   * Removes the element in a microtask. Helps prevent errors where we end up\n   * removing an element which is in the middle of an animation.\n   * Waits for the microtasks to settle before removing the element. Helps prevent\n   * errors where we end up removing an element which is in the middle of an animation.\n   */\n  private _completeExit() {\n    queueMicrotask(() => {\n      this._onExit.next();\n      this._onExit.complete();\n    });\n  }\n\n  /**\n   * Called after the portal contents have been attached. Can be\n   * used to modify the DOM once it's guaranteed to be in place.\n   */\n  protected _afterPortalAttached() {\n    const element: HTMLElement = this._elementRef.nativeElement;\n    const panelClasses = this.config.panelClass;\n\n    if (panelClasses) {\n      if (Array.isArray(panelClasses)) {\n        // Note that we can't use a spread here, because IE doesn't support multiple arguments.\n        panelClasses.forEach((cssClass) => element.classList.add(cssClass));\n      } else {\n        element.classList.add(panelClasses);\n      }\n    }\n\n    // currently, only a centered position is supported\n    element.classList.add('sbb-notification-toast-center');\n  }\n\n  /** Asserts that no content is already attached to the container. */\n  private _assertNotAttached() {\n    if (this._portalOutlet.hasAttached()) {\n      throw Error('Attempting to attach notification content after content is already attached');\n    }\n  }\n}\n\n@Component({\n  selector: 'sbb-notification-toast-container',\n  templateUrl: './notification-toast-container.html',\n  styleUrls: ['./notification-toast-container.css'],\n  // In Ivy embedded views will be change detected from their declaration place, rather than\n  // where they were stamped out. This means that we can't have the notification container be OnPush,\n  // because it might cause notifications that were opened from a template not to be out of date.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  encapsulation: ViewEncapsulation.None,\n  animations: [SBB_NOTIFICATION_TOAST_ANIMATIONS.notificationState],\n  host: {\n    class: 'sbb-notification-toast',\n    '[class.sbb-notification-toast-success]': 'config.type === \"success\"',\n    '[class.sbb-notification-toast-info]': 'config.type === \"info\"',\n    '[class.sbb-notification-toast-warn]': 'config.type === \"warn\"',\n    '[class.sbb-notification-toast-error]': 'config.type === \"error\"',\n    '[attr.role]': '_role',\n    '[@state]': '_animationState',\n    '(@state.done)': 'onAnimationEnd($event)',\n  },\n  imports: [SbbIcon, CdkPortalOutlet],\n})\nexport class SbbNotificationToastContainer extends SbbNotificationToastContainerBase {\n  protected override _afterPortalAttached() {\n    super._afterPortalAttached();\n\n    if (this.config.verticalPosition === 'top') {\n      this._elementRef.nativeElement.classList.add('sbb-notification-toast-top');\n    }\n  }\n}\n","<span class=\"sbb-notification-toast-icon-wrapper sbb-icon-fit\">\n  <sbb-icon [svgIcon]=\"_svgIcon\"></sbb-icon>\n</span>\n<div class=\"sbb-notification-toast-content\">\n  <ng-template cdkPortalOutlet></ng-template>\n</div>\n\n<button\n  (click)=\"exit()\"\n  class=\"sbb-notification-toast-icon-wrapper sbb-notification-toast-icon-close-wrapper sbb-icon-fit\"\n  type=\"button\"\n>\n  <sbb-icon svgIcon=\"cross-small\"></sbb-icon>\n</button>\n","import { OverlayRef } from '@angular/cdk/overlay';\nimport { TypeRef } from '@sbb-esta/angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport type { SbbNotificationToastContainerBase } from './notification-toast-container';\n\n/** Maximum amount of milliseconds that can be passed into setTimeout. */\nconst MAX_TIMEOUT = Math.pow(2, 31) - 1;\n\n/** Reference to a notification toast dispatched from the notification toast service. */\nexport class SbbNotificationToastRef<T> {\n  /** The instance of the component making up the content of the notification toast. */\n  instance: T;\n\n  /**\n   * The instance of the component making up the content of the notification toast.\n   * @docs-private\n   */\n  containerInstance: SbbNotificationToastContainerBase;\n\n  /** Subject for notifying the user that the notification toast has been dismissed. */\n  private readonly _afterDismissed = new Subject<void>();\n\n  /** Subject for notifying the user that the notification toast has opened and appeared. */\n  private readonly _afterOpened = new Subject<void>();\n\n  /**\n   * Timeout ID for the duration setTimeout call. Used to clear the timeout if the notification toast is\n   * dismissed before the duration passes.\n   */\n  private _durationTimeoutId: any;\n\n  constructor(\n    containerInstance: TypeRef<SbbNotificationToastContainerBase>,\n    private _overlayRef: OverlayRef,\n  ) {\n    this.containerInstance = containerInstance;\n    containerInstance._onExit.subscribe(() => this._finishDismiss());\n  }\n\n  /** Dismisses the notification toast. */\n  dismiss(): void {\n    if (!this._afterDismissed.closed) {\n      this.containerInstance.exit();\n    }\n    clearTimeout(this._durationTimeoutId);\n  }\n\n  /** Dismisses the notification toast after some duration */\n  _dismissAfter(duration: number): void {\n    // Note that we need to cap the duration to the maximum value for setTimeout, because\n    // it'll revert to 1 if somebody passes in something greater (e.g. `Infinity`). See #17234.\n    this._durationTimeoutId = setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));\n  }\n\n  /** Marks the notification toast as opened */\n  _open(): void {\n    if (!this._afterOpened.closed) {\n      this._afterOpened.next();\n      this._afterOpened.complete();\n    }\n  }\n\n  /** Cleans up the DOM after closing. */\n  private _finishDismiss(): void {\n    this._overlayRef.dispose();\n\n    this._afterDismissed.next(null!);\n    this._afterDismissed.complete();\n  }\n\n  /** Gets an observable that is notified when the notification toast is finished closing. */\n  afterDismissed(): Observable<void> {\n    return this._afterDismissed.asObservable();\n  }\n\n  /** Gets an observable that is notified when the notification toast has opened and appeared. */\n  afterOpened(): Observable<void> {\n    return this.containerInstance._onEnter;\n  }\n}\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\n\nimport { SBB_NOTIFICATION_TOAST_DATA } from './notification-toast-config';\nimport { SbbNotificationToastRef } from './notification-toast-ref';\n\n/** Interface for a simple notification toast component that has a message and a single action. */\nexport interface SbbTextOnlyNotificationToast {\n  data: { message: string };\n  notificationToastRef: SbbNotificationToastRef<SbbTextOnlyNotificationToast>;\n}\n\n/**\n * A component used to open as the default notification toast, matching digital.sbb.ch spec.\n * This should only be used internally by the notification toast service.\n */\n@Component({\n  selector: 'sbb-simple-notification',\n  templateUrl: './simple-notification.html',\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SbbSimpleNotification implements SbbTextOnlyNotificationToast {\n  notificationToastRef: SbbNotificationToastRef<SbbSimpleNotification> =\n    inject<SbbNotificationToastRef<SbbSimpleNotification>>(SbbNotificationToastRef);\n\n  /** Data that was injected into the notification toast. */\n  data: { message: string } = inject(SBB_NOTIFICATION_TOAST_DATA);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  /** Dismisses the notification toast. */\n  dismiss() {\n    this.notificationToastRef.dismiss();\n  }\n}\n","<span>{{ data.message }}</span>\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { NgModule } from '@angular/core';\nimport { SbbCommonModule } from '@sbb-esta/angular/core';\nimport { SbbIconModule } from '@sbb-esta/angular/icon';\n\nimport { SbbNotificationToastContainer } from './notification-toast-container';\nimport { SbbSimpleNotification } from './simple-notification';\n\n@NgModule({\n  imports: [\n    PortalModule,\n    OverlayModule,\n    SbbCommonModule,\n    SbbIconModule,\n    SbbNotificationToastContainer,\n    SbbSimpleNotification,\n  ],\n  exports: [SbbNotificationToastContainer, SbbSimpleNotification],\n})\nexport class SbbNotificationToastModule {}\n","import { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { BreakpointObserver } from '@angular/cdk/layout';\nimport {\n  ComponentType,\n  createOverlayRef,\n  Overlay,\n  OverlayConfig,\n  OverlayRef,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n  ComponentRef,\n  EmbeddedViewRef,\n  inject,\n  Injectable,\n  InjectionToken,\n  Injector,\n  OnDestroy,\n  TemplateRef,\n  Type,\n} from '@angular/core';\nimport { Breakpoints } from '@sbb-esta/angular/core';\nimport { takeUntil } from 'rxjs/operators';\n\nimport {\n  SbbNotificationToastConfig,\n  SBB_NOTIFICATION_TOAST_DATA,\n} from './notification-toast-config';\nimport {\n  SbbNotificationToastContainer,\n  SbbNotificationToastContainerBase,\n} from './notification-toast-container';\nimport { SbbNotificationToastRef } from './notification-toast-ref';\nimport { SbbNotificationToastModule } from './notification-toast.module';\nimport { SbbSimpleNotification, SbbTextOnlyNotificationToast } from './simple-notification';\n\n/** Injection token that can be used to specify default notification toast. */\nexport const SBB_NOTIFICATION_TOAST_DEFAULT_OPTIONS =\n  new InjectionToken<SbbNotificationToastConfig>('notification-default-options', {\n    providedIn: 'root',\n    factory: SBB_NOTIFICATION_TOAST_DEFAULT_OPTIONS_FACTORY,\n  });\n\n/** @docs-private */\nexport function SBB_NOTIFICATION_TOAST_DEFAULT_OPTIONS_FACTORY(): SbbNotificationToastConfig {\n  return new SbbNotificationToastConfig();\n}\n\n/** Service to dispatch notification toast messages. */\n@Injectable({ providedIn: SbbNotificationToastModule })\nexport class SbbNotificationToast implements OnDestroy {\n  private _overlay = inject(Overlay);\n  private _injector = inject(Injector);\n  private _live = inject(LiveAnnouncer);\n  private _breakpointObserver = inject(BreakpointObserver);\n  private _parentNotification = inject(SbbNotificationToast, { optional: true, skipSelf: true })!;\n  private _defaultConfig = inject<SbbNotificationToastConfig>(\n    SBB_NOTIFICATION_TOAST_DEFAULT_OPTIONS,\n  );\n\n  /**\n   * Reference to the current notification toast in the view *at this level* (in the Angular injector tree).\n   * If there is a parent notification toast service, all operations should delegate to that parent\n   * via `_openednotification toastRef`.\n   */\n  private _notificationRefAtThisLevel: SbbNotificationToastRef<any> | null = null;\n\n  /** The component that should be rendered as the notification toast's simple component. */\n  protected _simpleNotificationToastComponent: Type<SbbTextOnlyNotificationToast> =\n    SbbSimpleNotification;\n\n  /** The container component that attaches the provided template or component. */\n  protected _notificationToastContainerComponent: Type<SbbNotificationToastContainerBase> =\n    SbbNotificationToastContainer;\n\n  /** The CSS class to applie for mobile mode. */\n  protected _mobileDeviceCssClass: string = 'sbb-notification-toast-mobile';\n\n  /** Reference to the currently opened notification toast at *any* level. */\n  get _openedNotificationRef(): SbbNotificationToastRef<any> | null {\n    const parent = this._parentNotification;\n    return parent ? parent._openedNotificationRef : this._notificationRefAtThisLevel;\n  }\n\n  set _openedNotificationRef(value: SbbNotificationToastRef<any> | null) {\n    if (this._parentNotification) {\n      this._parentNotification._openedNotificationRef = value;\n    } else {\n      this._notificationRefAtThisLevel = value;\n    }\n  }\n\n  /** Inserted by Angular inject() migration for backwards compatibility */\n  constructor(...args: unknown[]);\n\n  constructor() {}\n\n  /**\n   * Creates and dispatches a notification toast with a custom component for the content, removing any\n   * currently opened notification toasts.\n   *\n   * @param component Component to be instantiated.\n   * @param config Extra configuration for the notification toast.\n   */\n  openFromComponent<T, D = any>(\n    component: ComponentType<T>,\n    config?: SbbNotificationToastConfig<D>,\n  ): SbbNotificationToastRef<T> {\n    return this._attach(component, config) as SbbNotificationToastRef<T>;\n  }\n\n  /**\n   * Creates and dispatches a notification toast with a custom template for the content, removing any\n   * currently opened notification toasts.\n   *\n   * @param template Template to be instantiated.\n   * @param config Extra configuration for the notification toast.\n   */\n  openFromTemplate(\n    template: TemplateRef<any>,\n    config?: SbbNotificationToastConfig,\n  ): SbbNotificationToastRef<EmbeddedViewRef<any>> {\n    return this._attach(template, config);\n  }\n\n  /**\n   * Opens a notification toast with a message and an optional action.\n   * @param message The message to show in the notification toast.\n   * @param action The label for the notification toast action.\n   * @param config Additional configuration options for the notification toast.\n   */\n  open(\n    message: string,\n    config?: SbbNotificationToastConfig,\n  ): SbbNotificationToastRef<SbbTextOnlyNotificationToast> {\n    const mergedConfig = { ...this._defaultConfig, ...config };\n\n    // Since the user doesn't have access to the component, we can\n    // override the data to pass in our own message and action.\n    mergedConfig.data = { message };\n\n    // Since the notification toast has `role=\"alert\"`, we don't\n    // want to announce the same message twice.\n    if (mergedConfig.announcementMessage === message) {\n      mergedConfig.announcementMessage = undefined;\n    }\n\n    return this.openFromComponent(this._simpleNotificationToastComponent, mergedConfig);\n  }\n\n  /** Dismisses the currently-visible notification toast. */\n  dismiss(): void {\n    if (this._openedNotificationRef) {\n      this._openedNotificationRef.dismiss();\n    }\n  }\n\n  ngOnDestroy() {\n    // Only dismiss the notification at the current level on destroy.\n    if (this._notificationRefAtThisLevel) {\n      this._notificationRefAtThisLevel.dismiss();\n    }\n  }\n\n  /** Attaches the notification toast container component to the overlay. */\n  private _attachNotificationToastContainer(\n    overlayRef: OverlayRef,\n    config: SbbNotificationToastConfig,\n  ): SbbNotificationToastContainerBase {\n    const userInjector = config?.viewContainerRef?.injector;\n    const injector = Injector.create({\n      parent: userInjector || this._injector,\n      providers: [\n        {\n          provide: SbbNotificationToastConfig,\n          useValue: config,\n        },\n      ],\n    });\n\n    const containerPortal = new ComponentPortal(\n      this._notificationToastContainerComponent,\n      config.viewContainerRef,\n      injector,\n    );\n    const containerRef: ComponentRef<SbbNotificationToastContainerBase> =\n      overlayRef.attach(containerPortal);\n    containerRef.instance.config = config;\n    return containerRef.instance;\n  }\n\n  /** Places a new component or a template as the content of the notification toast container. */\n  private _attach<T>(\n    content: ComponentType<T> | TemplateRef<T>,\n    userConfig?: SbbNotificationToastConfig,\n  ): SbbNotificationToastRef<T | EmbeddedViewRef<any>> {\n    const config = { ...new SbbNotificationToastConfig(), ...this._defaultConfig, ...userConfig };\n    const overlayRef = this._createOverlay(config);\n    const container = this._attachNotificationToastContainer(overlayRef, config);\n    const notificationRef = new SbbNotificationToastRef<T | EmbeddedViewRef<any>>(\n      container,\n      overlayRef,\n    );\n\n    if (content instanceof TemplateRef) {\n      const portal = new TemplatePortal(content, null!, {\n        $implicit: config.data,\n        notificationRef,\n      } as any);\n\n      notificationRef.instance = container.attachTemplatePortal(portal);\n    } else {\n      const injector = this._createInjector(config, notificationRef);\n      const portal = new ComponentPortal(content, undefined, injector);\n      const contentRef = container.attachComponentPortal<T>(portal);\n\n      // We can't pass this via the injector, because the injector is created earlier.\n      notificationRef.instance = contentRef.instance;\n    }\n\n    // Subscribe to the breakpoint observer and attach the notification-mobile class as\n    // appropriate. This class is applied to the overlay element because the overlay must expand to\n    // fill the width of the screen for full width notifications.\n    this._breakpointObserver\n      .observe(Breakpoints.MobileDevicePortrait)\n      .pipe(takeUntil(overlayRef.detachments()))\n      .subscribe((state) => {\n        const classList = overlayRef.overlayElement.classList;\n        state.matches\n          ? classList.add(this._mobileDeviceCssClass)\n          : classList.remove(this._mobileDeviceCssClass);\n      });\n\n    this._animateNotification(notificationRef, config);\n    this._openedNotificationRef = notificationRef;\n    return this._openedNotificationRef;\n  }\n\n  /** Animates the old notification toast out and the new one in. */\n  private _animateNotification(\n    notificationRef: SbbNotificationToastRef<any>,\n    config: SbbNotificationToastConfig,\n  ) {\n    // When the notification toast is dismissed, clear the reference to it.\n    notificationRef.afterDismissed().subscribe(() => {\n      // Clear the notification toast ref if it hasn't already been replaced by a newer notification toast.\n      if (this._openedNotificationRef === notificationRef) {\n        this._openedNotificationRef = null;\n      }\n\n      if (config.announcementMessage) {\n        this._live.clear();\n      }\n    });\n\n    if (this._openedNotificationRef) {\n      // If a notification toast is already in view, dismiss it and enter the\n      // new notification toast after exit animation is complete.\n      this._openedNotificationRef.afterDismissed().subscribe(() => {\n        notificationRef.containerInstance.enter();\n      });\n      this._openedNotificationRef.dismiss();\n    } else {\n      // If no notification toast is in view, enter the new notification toast.\n      notificationRef.containerInstance.enter();\n    }\n\n    // If a dismiss timeout is provided, set up dismiss based on after the notification toast is opened.\n    if (config.duration && config.duration > 0) {\n      notificationRef\n        .afterOpened()\n        .subscribe(() => notificationRef._dismissAfter(config.duration!));\n    }\n\n    if (config.announcementMessage) {\n      this._live.announce(config.announcementMessage, config.politeness);\n    }\n  }\n\n  /**\n   * Creates a new overlay and places it in the correct location.\n   * @param config The user-specified notification toast config.\n   */\n  private _createOverlay(config: SbbNotificationToastConfig): OverlayRef {\n    const overlayConfig = new OverlayConfig();\n    const positionStrategy = this._overlay.position().global();\n\n    // Set horizontal position.\n    positionStrategy.centerHorizontally();\n\n    // Set horizontal position.\n    if (config.verticalPosition === 'top') {\n      positionStrategy.top('0');\n    } else {\n      positionStrategy.bottom('0');\n    }\n\n    overlayConfig.positionStrategy = positionStrategy;\n    return createOverlayRef(this._injector, overlayConfig);\n  }\n\n  /**\n   * Creates an injector to be used inside of a notification toast component.\n   * @param config Config that was used to create the notification toast.\n   * @param notificationRef toastRef Reference to the notification toast.\n   */\n  private _createInjector<T>(\n    config: SbbNotificationToastConfig,\n    notificationRef: SbbNotificationToastRef<T>,\n  ) {\n    const userInjector = config?.viewContainerRef?.injector;\n\n    return Injector.create({\n      parent: userInjector || this._injector,\n      providers: [\n        { provide: SbbNotificationToastRef, useValue: notificationRef },\n        { provide: SBB_NOTIFICATION_TOAST_DATA, useValue: config.data },\n      ],\n    });\n  }\n}\n"],"names":["SBB_NOTIFICATION_TOAST_DATA","InjectionToken","SbbNotificationToastConfig","politeness","announcementMessage","viewContainerRef","duration","panelClass","data","verticalPosition","type","SBB_NOTIFICATION_TOAST_ANIMATIONS","notificationState","trigger","state","style","transform","opacity","transition","animate","SbbNotificationToastContainerBase","BasePortalOutlet","_ngZone","_elementRef","_changeDetectorRef","config","_destroyed","_portalOutlet","_onExit","Subject","_onEnter","_animationState","_role","_svgIcon","constructor","attachComponentPortal","portal","_assertNotAttached","result","_afterPortalAttached","attachTemplatePortal","attachDomPortal","onAnimationEnd","event","fromState","toState","_completeExit","onEnter","run","next","complete","enter","markForCheck","detectChanges","exit","nativeElement","setAttribute","ngOnDestroy","queueMicrotask","element","panelClasses","Array","isArray","forEach","cssClass","classList","add","hasAttached","Error","deps","token","i0","NgZone","ElementRef","ChangeDetectorRef","i1","target","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","CdkPortalOutlet","descendants","static","usesInheritance","ngImport","decorators","ViewChild","args","SbbNotificationToastContainer","Component","isStandalone","selector","host","listeners","properties","classAttribute","template","styles","dependencies","kind","SbbIcon","inputs","exportAs","outputs","animations","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","None","class","imports","MAX_TIMEOUT","Math","pow","SbbNotificationToastRef","_overlayRef","instance","containerInstance","_afterDismissed","_afterOpened","_durationTimeoutId","subscribe","_finishDismiss","dismiss","closed","clearTimeout","_dismissAfter","setTimeout","min","_open","dispose","afterDismissed","asObservable","afterOpened","SbbSimpleNotification","notificationToastRef","inject","ɵcmp","ɵɵngDeclareComponent","OnPush","SbbNotificationToastModule","NgModule","ɵmod","ɵɵngDeclareNgModule","PortalModule","OverlayModule","SbbCommonModule","SbbIconModule","exports","ɵinj","ɵɵngDeclareInjector","SBB_NOTIFICATION_TOAST_DEFAULT_OPTIONS","providedIn","factory","SBB_NOTIFICATION_TOAST_DEFAULT_OPTIONS_FACTORY","SbbNotificationToast","_overlay","Overlay","_injector","Injector","_live","LiveAnnouncer","_breakpointObserver","BreakpointObserver","_parentNotification","optional","skipSelf","_defaultConfig","_notificationRefAtThisLevel","_simpleNotificationToastComponent","_notificationToastContainerComponent","_mobileDeviceCssClass","_openedNotificationRef","parent","value","openFromComponent","component","_attach","openFromTemplate","open","message","mergedConfig","undefined","_attachNotificationToastContainer","overlayRef","userInjector","injector","create","providers","provide","useValue","containerPortal","ComponentPortal","containerRef","attach","content","userConfig","_createOverlay","container","notificationRef","TemplateRef","TemplatePortal","$implicit","_createInjector","contentRef","observe","Breakpoints","MobileDevicePortrait","pipe","takeUntil","detachments","overlayElement","matches","remove","_animateNotification","clear","announce","overlayConfig","OverlayConfig","positionStrategy","position","global","centerHorizontally","top","bottom","createOverlayRef","Injectable","ɵprov","ɵɵngDeclareInjectable"],"mappings":";;;;;;;;;;;;MAKaA,2BAA2B,GAAG,IAAIC,cAAc,CAAM,0BAA0B;MAKhFC,0BAA0B,CAAA;AAErCC,EAAAA,UAAU,GAAwB,WAAW;EAM7CC,mBAAmB;EAMnBC,gBAAgB;AAGhBC,EAAAA,QAAQ,GAAY,CAAC;EAGrBC,UAAU;AAGVC,EAAAA,IAAI,GAAc,IAAI;AAGtBC,EAAAA,gBAAgB,GAA0C,QAAQ;AAGlEC,EAAAA,IAAI,GAAyB,SAAS;AACvC;;AC/BM,MAAMC,iCAAiC,GAE1C;EAEFC,iBAAiB,EAAEC,OAAO,CAAC,OAAO,EAAE,CAClCC,KAAK,CACH,cAAc,EACdC,KAAK,CAAC;AACJC,IAAAA,SAAS,EAAE,YAAY;AACvBC,IAAAA,OAAO,EAAE;GACV,CAAC,CACH,EACDH,KAAK,CACH,SAAS,EACTC,KAAK,CAAC;AACJC,IAAAA,SAAS,EAAE,UAAU;AACrBC,IAAAA,OAAO,EAAE;GACV,CAAC,CACH,EACDC,UAAU,CAAC,cAAc,EAAEC,OAAO,CAAC,kCAAkC,CAAC,CAAC,EACvED,UAAU,CACR,wBAAw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