import { __decorate } from "tslib";
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
import { Select } from '@ngxs/store';
import { NotificationsUiSelectors } from '../../../../state/ui/notifications/notifications.selectors';
import { GlobalInjector } from '../../../../common/services/global-injector';
import { showNotificationsDialog } from '../../dialogs/show-notifications-dialog';
import * as i0 from "@angular/core";
import * as i1 from "@ngxs/store";
import * as i2 from "@angular/common";
import * as i3 from "primeng/badge";
import * as i4 from "primeng/api";
import * as i5 from "primeng/overlaypanel";
import * as i6 from "../../../smz-responsive/smz-responsive.component";
import * as i7 from "../../components/list/notifications-list.component";
export class SmzNotificationsComponent {
    constructor(store) {
        this.store = store;
        this.uiConfig = GlobalInjector.config;
    }
    showDialog() {
        showNotificationsDialog();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SmzNotificationsComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: SmzNotificationsComponent, selector: "smz-ui-notifications", ngImport: i0, template: "<ng-container *ngIf=\"notifications$ | async as notifications\">\r\n\r\n<smz-responsive class=\"col grid grid-nogutter w-full items-center justify-start\">\r\n\r\n    <!-- LANDSCAPE -->\r\n    <ng-template pTemplate=\"landscape\">\r\n\r\n      <i class=\"pi pi-bell badge-color regular-badge\" pBadge [value]=\"(newCount$ | async).toString()\">\r\n        <div class=\"absolute inset-0 notification-container cursor-pointer\" (click)=\"op.toggle($event)\"></div>\r\n      </i>\r\n\r\n      <p-overlayPanel #op styleClass=\"max-h-[85vh] overflow-y-auto\" [style]=\"{ 'width': uiConfig.rbkUtils.notifications.width, 'z-index': uiConfig.rbkUtils.notifications.zIndex }\" [ngClass]=\"uiConfig.rbkUtils.notifications.styleClass\" appendTo=\"body\" [autoZIndex]=\"false\">\r\n        <ng-template pTemplate>\r\n            <smz-notifications-list></smz-notifications-list>\r\n        </ng-template>\r\n      </p-overlayPanel>\r\n\r\n    </ng-template>\r\n\r\n    <!-- PORTRAIT -->\r\n    <ng-template pTemplate=\"portrait\">\r\n\r\n      <i class=\"pi pi-bell badge-color regular-badge\" pBadge [value]=\"(newCount$ | async).toString()\">\r\n        <div class=\"absolute inset-0 notification-container cursor-pointer\" (click)=\"showDialog()\"></div>\r\n      </i>\r\n\r\n    </ng-template>\r\n\r\n  </smz-responsive>\r\n\r\n</ng-container>", styles: ["smz-ui-notifications .notification-container{min-width:40px}smz-ui-notifications .badge-color{color:var(--text-color-secondary)}smz-ui-notifications .p-badge{background:var(--surface-a);color:var(--primary-color)}smz-ui-notifications .regular-badge{font-size:1.6rem;line-height:1.6rem}smz-ui-notifications .regular-badge .p-badge{font-size:.8rem;font-weight:700;min-width:1.1rem;height:1.1rem;line-height:1.1rem}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.BadgeDirective, selector: "[pBadge]", inputs: ["badgeDisabled", "badgeSize", "size", "severity", "value"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.OverlayPanel, selector: "p-overlayPanel", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i6.SmzResponsiveComponent, selector: "smz-responsive" }, { kind: "component", type: i7.NotificationsListComponent, selector: "smz-notifications-list" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
__decorate([
    Select(NotificationsUiSelectors.all)
], SmzNotificationsComponent.prototype, "notifications$", void 0);
__decorate([
    Select(NotificationsUiSelectors.newCount)
], SmzNotificationsComponent.prototype, "newCount$", void 0);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: SmzNotificationsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'smz-ui-notifications', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"notifications$ | async as notifications\">\r\n\r\n<smz-responsive class=\"col grid grid-nogutter w-full items-center justify-start\">\r\n\r\n    <!-- LANDSCAPE -->\r\n    <ng-template pTemplate=\"landscape\">\r\n\r\n      <i class=\"pi pi-bell badge-color regular-badge\" pBadge [value]=\"(newCount$ | async).toString()\">\r\n        <div class=\"absolute inset-0 notification-container cursor-pointer\" (click)=\"op.toggle($event)\"></div>\r\n      </i>\r\n\r\n      <p-overlayPanel #op styleClass=\"max-h-[85vh] overflow-y-auto\" [style]=\"{ 'width': uiConfig.rbkUtils.notifications.width, 'z-index': uiConfig.rbkUtils.notifications.zIndex }\" [ngClass]=\"uiConfig.rbkUtils.notifications.styleClass\" appendTo=\"body\" [autoZIndex]=\"false\">\r\n        <ng-template pTemplate>\r\n            <smz-notifications-list></smz-notifications-list>\r\n        </ng-template>\r\n      </p-overlayPanel>\r\n\r\n    </ng-template>\r\n\r\n    <!-- PORTRAIT -->\r\n    <ng-template pTemplate=\"portrait\">\r\n\r\n      <i class=\"pi pi-bell badge-color regular-badge\" pBadge [value]=\"(newCount$ | async).toString()\">\r\n        <div class=\"absolute inset-0 notification-container cursor-pointer\" (click)=\"showDialog()\"></div>\r\n      </i>\r\n\r\n    </ng-template>\r\n\r\n  </smz-responsive>\r\n\r\n</ng-container>", styles: ["smz-ui-notifications .notification-container{min-width:40px}smz-ui-notifications .badge-color{color:var(--text-color-secondary)}smz-ui-notifications .p-badge{background:var(--surface-a);color:var(--primary-color)}smz-ui-notifications .regular-badge{font-size:1.6rem;line-height:1.6rem}smz-ui-notifications .regular-badge .p-badge{font-size:.8rem;font-weight:700;min-width:1.1rem;height:1.1rem;line-height:1.1rem}\n"] }]
        }], ctorParameters: () => [{ type: i1.Store }], propDecorators: { notifications$: [], newCount$: [] } });
//# sourceMappingURL=data:application/json;base64, 