{"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      ],\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