import { ChangeDetectionStrategy, Component } from '@angular/core';
import { NOTIFICATION_ICON_MAP } from '@ironsource/fusion-ui/components/notification/common/entities';
import { NotificationBaseComponent } from '@ironsource/fusion-ui/components/notification/common/base';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/components/modal/v2";
import * as i3 from "@ironsource/fusion-ui/components/icon/v1";
function NotificationComponent_ng_container_0_fusion_icon_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 8);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵclassMap(ctx_r1.notificationType);
    i0.ɵɵproperty("name", ctx_r1.getIconName());
} }
function NotificationComponent_ng_container_0_fusion_modal_footer_8_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-modal-footer", 9);
    i0.ɵɵlistener("onSave", function NotificationComponent_ng_container_0_fusion_modal_footer_8_Template_fusion_modal_footer_onSave_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.primaryButtonClicked()); })("closeButtonClicked", function NotificationComponent_ng_container_0_fusion_modal_footer_8_Template_fusion_modal_footer_closeButtonClicked_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r5.secondaryButtonClicked()); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("notificationFooter", true)("saveButtonText", ctx_r2.data == null ? null : ctx_r2.data.buttons == null ? null : ctx_r2.data.buttons.primary == null ? null : ctx_r2.data.buttons.primary.label)("saveButtonClass", (ctx_r2.data == null ? null : ctx_r2.data.buttons == null ? null : ctx_r2.data.buttons.primary == null ? null : ctx_r2.data.buttons.primary.class) || "primary")("saveButtonLoading", ctx_r2.data == null ? null : ctx_r2.data.buttons == null ? null : ctx_r2.data.buttons.primary == null ? null : ctx_r2.data.buttons.primary.loading)("cancelButtonHidden", !(ctx_r2.data == null ? null : ctx_r2.data.buttons == null ? null : ctx_r2.data.buttons.secondary))("cancelButtonText", ctx_r2.data == null ? null : ctx_r2.data.buttons == null ? null : ctx_r2.data.buttons.secondary == null ? null : ctx_r2.data.buttons.secondary.label)("cancelButtonClass", (ctx_r2.data == null ? null : ctx_r2.data.buttons == null ? null : ctx_r2.data.buttons.secondary == null ? null : ctx_r2.data.buttons.secondary.class) || "secondary");
} }
function NotificationComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 1)(2, "fusion-icon", 2);
    i0.ɵɵlistener("click", function NotificationComponent_ng_container_0_Template_fusion_icon_click_2_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.secondaryButtonClicked()); });
    i0.ɵɵpipe(3, "async");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 3);
    i0.ɵɵtemplate(5, NotificationComponent_ng_container_0_fusion_icon_5_Template, 1, 4, "fusion-icon", 4);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelement(7, "div", 5);
    i0.ɵɵtemplate(8, NotificationComponent_ng_container_0_fusion_modal_footer_8_Template, 1, 7, "fusion-modal-footer", 6);
    i0.ɵɵelementEnd();
    i0.ɵɵelement(9, "div", 7);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("name", i0.ɵɵpipeBind1(3, 6, ctx_r0.closeIconName$));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngClass", ctx_r0.notificationType);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.notificationType !== "basic");
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r0.data.title, " ");
    i0.ɵɵadvance();
    i0.ɵɵproperty("innerHtml", ctx_r0.data.content, i0.ɵɵsanitizeHtml);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.data.buttons);
} }
export class NotificationComponent extends NotificationBaseComponent {
    ngOnInit() {
        this.closeIconName$.next({ iconName: 'close', iconVersion: 'v2' });
    }
    getIconName() {
        return NOTIFICATION_ICON_MAP[2][this.notificationType];
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵNotificationComponent_BaseFactory; return function NotificationComponent_Factory(t) { return (ɵNotificationComponent_BaseFactory || (ɵNotificationComponent_BaseFactory = i0.ɵɵgetInheritedFactory(NotificationComponent)))(t || NotificationComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NotificationComponent, selectors: [["fusion-notification"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "is-notification"], [1, "close", 3, "name", "click"], [1, "is-header", 3, "ngClass"], [3, "class", "name", 4, "ngIf"], [1, "is-notification-content", 3, "innerHtml"], [3, "notificationFooter", "saveButtonText", "saveButtonClass", "saveButtonLoading", "cancelButtonHidden", "cancelButtonText", "cancelButtonClass", "onSave", "closeButtonClicked", 4, "ngIf"], [1, "is-notification-overlay"], [3, "name"], [3, "notificationFooter", "saveButtonText", "saveButtonClass", "saveButtonLoading", "cancelButtonHidden", "cancelButtonText", "cancelButtonClass", "onSave", "closeButtonClicked"]], template: function NotificationComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, NotificationComponent_ng_container_0_Template, 10, 8, "ng-container", 0);
        } if (rf & 2) {
            i0.ɵɵproperty("ngIf", ctx.data == null ? null : ctx.data.shown);
        } }, dependencies: [i1.NgClass, i1.NgIf, i2.ModalFooterComponent, i3.IconComponent, i1.AsyncPipe], styles: ["[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]{font-size:15px;font-family:NHaasGroteskDSPro-75Bd,sans-serif;font-weight:400}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-notification-content[_ngcontent-%COMP%]{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}[_nghost-%COMP%]   .is-notification-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:.75;z-index:3010}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]{line-height:20px;position:fixed;z-index:3011;left:0;right:0;margin:auto;width:400px;min-height:200px;top:38%;background-color:var(--fu-white, #ffffff);border-radius:8px;box-shadow:0 0 20px #1e1e1e0d}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:17px;right:16px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]     svg{width:15px;height:15px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]     svg *{fill:var(--fu-light-700, #a9afb4)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]:hover     svg{width:15px;height:15px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]:hover     svg *{fill:var(--fu-light-900, #7b838c)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]{color:var(--fu-dark-300, #313d91);padding:42px 33px 10px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]:not(.basic){padding-left:93px;padding-bottom:26px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]:not(.basic):before{content:\"\";width:44px;height:44px;border:solid 2px var(--fu-light-100, #f7f8f9);border-radius:25px;position:absolute;top:28px;left:33px;display:block}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]:not(.basic)   fusion-icon[_ngcontent-%COMP%]{position:absolute;left:45px;top:39px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.basic[_ngcontent-%COMP%]{padding:30px 33px 13px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.basic[_ngcontent-%COMP%] + .is-notification-content[_ngcontent-%COMP%]{min-height:65px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.info[_ngcontent-%COMP%]:before{border-color:var(--fu-primary-200, #c9dfff)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.info[_ngcontent-%COMP%]   fusion-icon[class^=info][_ngcontent-%COMP%]     svg{width:25px;height:25px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.info[_ngcontent-%COMP%]   fusion-icon[class^=info][_ngcontent-%COMP%]     svg *{fill:var(--fu-primary-500, #3083ff)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.success[_ngcontent-%COMP%]:before{border-color:var(--fu-secondary-200, #bff2f5)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.success[_ngcontent-%COMP%]   fusion-icon[class^=success][_ngcontent-%COMP%]{left:46px;top:41px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.success[_ngcontent-%COMP%]   fusion-icon[class^=success][_ngcontent-%COMP%]     svg{width:25px;height:25px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.success[_ngcontent-%COMP%]   fusion-icon[class^=success][_ngcontent-%COMP%]     svg *{fill:var(--fu-secondary-500, #00ccd7)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.error[_ngcontent-%COMP%]:before{border-color:var(--fu-negative-200, #ffcbce)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.error[_ngcontent-%COMP%]   fusion-icon[class^=error][_ngcontent-%COMP%]{left:45px;top:40px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.error[_ngcontent-%COMP%]   fusion-icon[class^=error][_ngcontent-%COMP%]     svg{width:25px;height:25px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.error[_ngcontent-%COMP%]   fusion-icon[class^=error][_ngcontent-%COMP%]     svg *{fill:var(--fu-negative-500, #ff6a63)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.warning[_ngcontent-%COMP%]:before{border-color:var(--fu-neutral-200, #ffe0a3)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.warning[_ngcontent-%COMP%]   fusion-icon[class^=warning][_ngcontent-%COMP%]{left:45px;top:40px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.warning[_ngcontent-%COMP%]   fusion-icon[class^=warning][_ngcontent-%COMP%]     svg{width:25px;height:25px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.warning[_ngcontent-%COMP%]   fusion-icon[class^=warning][_ngcontent-%COMP%]     svg *{fill:var(--fu-neutral-500, #ffb424)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.delete[_ngcontent-%COMP%]:before{border-color:var(--fu-negative-200, #ffcbce)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.delete[_ngcontent-%COMP%]   fusion-icon[class^=delete][_ngcontent-%COMP%]     svg{width:25px;height:25px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header.delete[_ngcontent-%COMP%]   fusion-icon[class^=delete][_ngcontent-%COMP%]     svg *{fill:var(--fu-negative-500, #ff6a63)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-notification-content[_ngcontent-%COMP%]{color:var(--fu-dark-300, #313d91);line-height:1.67;position:relative;padding:0 32px 32px}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotificationComponent, [{
        type: Component,
        args: [{ selector: 'fusion-notification', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"data?.shown\">\n    <div class=\"is-notification\">\n        <fusion-icon class=\"close\" [name]=\"closeIconName$ | async\" (click)=\"secondaryButtonClicked()\"></fusion-icon>\n        <div class=\"is-header\" [ngClass]=\"notificationType\">\n            <fusion-icon\n                *ngIf=\"notificationType !== 'basic'\"\n                class=\"{{ notificationType }}\"\n                [name]=\"getIconName()\"\n            ></fusion-icon>\n            {{ data.title }}\n        </div>\n\n        <div class=\"is-notification-content\" [innerHtml]=\"data.content\"></div>\n\n        <fusion-modal-footer\n            *ngIf=\"data.buttons\"\n            [notificationFooter]=\"true\"\n            [saveButtonText]=\"data?.buttons?.primary?.label\"\n            [saveButtonClass]=\"data?.buttons?.primary?.class || 'primary'\"\n            [saveButtonLoading]=\"data?.buttons?.primary?.loading\"\n            [cancelButtonHidden]=\"!data?.buttons?.secondary\"\n            [cancelButtonText]=\"data?.buttons?.secondary?.label\"\n            [cancelButtonClass]=\"data?.buttons?.secondary?.class || 'secondary'\"\n            (onSave)=\"primaryButtonClicked()\"\n            (closeButtonClicked)=\"secondaryButtonClicked()\"\n        ></fusion-modal-footer>\n    </div>\n    <div class=\"is-notification-overlay\"></div>\n</ng-container>\n", styles: [":host .is-notification .is-header{font-size:15px;font-family:NHaasGroteskDSPro-75Bd,sans-serif;font-weight:400}:host .is-notification .is-notification-content{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}:host .is-notification-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:.75;z-index:3010}:host .is-notification{line-height:20px;position:fixed;z-index:3011;left:0;right:0;margin:auto;width:400px;min-height:200px;top:38%;background-color:var(--fu-white, #ffffff);border-radius:8px;box-shadow:0 0 20px #1e1e1e0d}:host .is-notification fusion-icon[class^=close]{cursor:pointer;position:absolute;top:17px;right:16px}:host .is-notification fusion-icon[class^=close] ::ng-deep svg{width:15px;height:15px}:host .is-notification fusion-icon[class^=close] ::ng-deep svg *{fill:var(--fu-light-700, #a9afb4)}:host .is-notification fusion-icon[class^=close]:hover ::ng-deep svg{width:15px;height:15px}:host .is-notification fusion-icon[class^=close]:hover ::ng-deep svg *{fill:var(--fu-light-900, #7b838c)}:host .is-notification .is-header{color:var(--fu-dark-300, #313d91);padding:42px 33px 10px}:host .is-notification .is-header:not(.basic){padding-left:93px;padding-bottom:26px}:host .is-notification .is-header:not(.basic):before{content:\"\";width:44px;height:44px;border:solid 2px var(--fu-light-100, #f7f8f9);border-radius:25px;position:absolute;top:28px;left:33px;display:block}:host .is-notification .is-header:not(.basic) fusion-icon{position:absolute;left:45px;top:39px}:host .is-notification .is-header.basic{padding:30px 33px 13px}:host .is-notification .is-header.basic+.is-notification-content{min-height:65px}:host .is-notification .is-header.info:before{border-color:var(--fu-primary-200, #c9dfff)}:host .is-notification .is-header.info fusion-icon[class^=info] ::ng-deep svg{width:25px;height:25px}:host .is-notification .is-header.info fusion-icon[class^=info] ::ng-deep svg *{fill:var(--fu-primary-500, #3083ff)}:host .is-notification .is-header.success:before{border-color:var(--fu-secondary-200, #bff2f5)}:host .is-notification .is-header.success fusion-icon[class^=success]{left:46px;top:41px}:host .is-notification .is-header.success fusion-icon[class^=success] ::ng-deep svg{width:25px;height:25px}:host .is-notification .is-header.success fusion-icon[class^=success] ::ng-deep svg *{fill:var(--fu-secondary-500, #00ccd7)}:host .is-notification .is-header.error:before{border-color:var(--fu-negative-200, #ffcbce)}:host .is-notification .is-header.error fusion-icon[class^=error]{left:45px;top:40px}:host .is-notification .is-header.error fusion-icon[class^=error] ::ng-deep svg{width:25px;height:25px}:host .is-notification .is-header.error fusion-icon[class^=error] ::ng-deep svg *{fill:var(--fu-negative-500, #ff6a63)}:host .is-notification .is-header.warning:before{border-color:var(--fu-neutral-200, #ffe0a3)}:host .is-notification .is-header.warning fusion-icon[class^=warning]{left:45px;top:40px}:host .is-notification .is-header.warning fusion-icon[class^=warning] ::ng-deep svg{width:25px;height:25px}:host .is-notification .is-header.warning fusion-icon[class^=warning] ::ng-deep svg *{fill:var(--fu-neutral-500, #ffb424)}:host .is-notification .is-header.delete:before{border-color:var(--fu-negative-200, #ffcbce)}:host .is-notification .is-header.delete fusion-icon[class^=delete] ::ng-deep svg{width:25px;height:25px}:host .is-notification .is-header.delete fusion-icon[class^=delete] ::ng-deep svg *{fill:var(--fu-negative-500, #ff6a63)}:host .is-notification .is-notification-content{color:var(--fu-dark-300, #313d91);line-height:1.67;position:relative;padding:0 32px 32px}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NotificationComponent, { className: "NotificationComponent", filePath: "notification.component.ts", lineNumber: 11 }); })();
//# sourceMappingURL=data:application/json;base64, 