import { Component } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../custom-templates.service";
import * as i2 from "../notification.service";
import * as i3 from "../theme.service";
import * as i4 from "@angular/common";
import * as i5 from "../notification/notification.component";
import * as i6 from "@ngx-translate/core";
/**
 * The `NotificationList` component displays the list of active notifications.
 */
export class NotificationListComponent {
    constructor(customTemplatesService, notificationService, themeService) {
        this.customTemplatesService = customTemplatesService;
        this.notificationService = notificationService;
        this.themeService = themeService;
        this.notifications$ = this.notificationService.notifications$;
        this.theme$ = this.themeService.theme$;
    }
    getNotificationContentContext(notification) {
        return {
            ...notification.templateContext,
            dismissFn: notification.dismissFn,
        };
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0", ngImport: i0, type: NotificationListComponent, deps: [{ token: i1.CustomTemplatesService }, { token: i2.NotificationService }, { token: i3.ThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.0", type: NotificationListComponent, selector: "stream-notification-list", ngImport: i0, template: "<div\n  data-testid=\"notification-list\"\n  class=\"str-chat str-chat__theme-{{\n    theme$ | async\n  }} str-chat__list-notifications\"\n>\n  @for (notification of notifications$ | async; track notification.id) {\n    <ng-template #notificationContent>\n      @if (notification.text !== undefined) {\n        <div data-testclass=\"notification-content\">\n          {{ notification.text | translate: notification.translateParams }}\n        </div>\n      }\n      @if (notification.template !== undefined) {\n        <ng-container\n          *ngTemplateOutlet=\"\n            notification.template;\n            context: getNotificationContentContext(notification)\n          \"\n        />\n      }\n    </ng-template>\n    <ng-container\n      *ngTemplateOutlet=\"\n        (customTemplatesService.notificationTemplate$ | async) ||\n          defaultNotification;\n        context: { type: notification.type, content: notificationContent }\n      \"\n    />\n  }\n</div>\n\n<ng-template #defaultNotification let-type=\"type\" let-content=\"content\">\n  <stream-notification [type]=\"type\" [content]=\"content\" />\n</ng-template>\n", dependencies: [{ kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.NotificationComponent, selector: "stream-notification", inputs: ["type", "content"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0", ngImport: i0, type: NotificationListComponent, decorators: [{
            type: Component,
            args: [{ selector: 'stream-notification-list', template: "<div\n  data-testid=\"notification-list\"\n  class=\"str-chat str-chat__theme-{{\n    theme$ | async\n  }} str-chat__list-notifications\"\n>\n  @for (notification of notifications$ | async; track notification.id) {\n    <ng-template #notificationContent>\n      @if (notification.text !== undefined) {\n        <div data-testclass=\"notification-content\">\n          {{ notification.text | translate: notification.translateParams }}\n        </div>\n      }\n      @if (notification.template !== undefined) {\n        <ng-container\n          *ngTemplateOutlet=\"\n            notification.template;\n            context: getNotificationContentContext(notification)\n          \"\n        />\n      }\n    </ng-template>\n    <ng-container\n      *ngTemplateOutlet=\"\n        (customTemplatesService.notificationTemplate$ | async) ||\n          defaultNotification;\n        context: { type: notification.type, content: notificationContent }\n      \"\n    />\n  }\n</div>\n\n<ng-template #defaultNotification let-type=\"type\" let-content=\"content\">\n  <stream-notification [type]=\"type\" [content]=\"content\" />\n</ng-template>\n" }]
        }], ctorParameters: () => [{ type: i1.CustomTemplatesService }, { type: i2.NotificationService }, { type: i3.ThemeService }] });
//# sourceMappingURL=data:application/json;base64, 