import * as i0 from '@angular/core';
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import { NOTIFICATION_ICON_MAP } from '@ironsource/fusion-ui/components/notification/common/entities';
export * from '@ironsource/fusion-ui/components/notification/common/entities';
import { NotificationBaseComponent } from '@ironsource/fusion-ui/components/notification/common/base';
import * as i2 from '@ironsource/fusion-ui/components/modal/v1';
import { ModalModule } from '@ironsource/fusion-ui/components/modal/v1';
import * as i3 from '@ironsource/fusion-ui/components/icon/v1';
import { IconModule } from '@ironsource/fusion-ui/components/icon/v1';
export * from '@ironsource/fusion-ui/components/notification/common/services';

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);
} }
class NotificationComponent extends NotificationBaseComponent {
    ngOnInit() {
        this.closeIconName$.next({ iconName: 'close', iconVersion: 'v1' });
    }
    getIconName() {
        return NOTIFICATION_ICON_MAP[1][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:var(--bold-font-family, \"NHaasGroteskTXPro-75Bd\");font-weight:600}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]{border-radius:var(--border-radius, 3px)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]{border:1px solid var(--light-color, #E1E6EB)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]{position:fixed;z-index:3011;top:38%;left:0;right:0;width:400px;display:block;margin:auto;text-align:left;background-color:#fff;box-shadow:4px 4px 4px #0000001a}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]{padding:15px 30px 10px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=info][_ngcontent-%COMP%]{vertical-align:sub;margin-right:5px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=info][_ngcontent-%COMP%]     svg{width:20px;height:20px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=info][_ngcontent-%COMP%]     svg *{fill:var(--light-color-800, #678099)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=error][_ngcontent-%COMP%]{vertical-align:sub;margin-right:5px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=error][_ngcontent-%COMP%]     svg{width:20px;height:20px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=error][_ngcontent-%COMP%]     svg *{fill:var(--negative-color, #e1174c)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=success][_ngcontent-%COMP%]{vertical-align:sub;margin-right:5px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=success][_ngcontent-%COMP%]     svg{width:20px;height:20px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=success][_ngcontent-%COMP%]     svg *{fill:var(--positive-color, #13C7C8)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=warning][_ngcontent-%COMP%]{vertical-align:sub;margin-right:5px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=warning][_ngcontent-%COMP%]     svg{width:20px;height:20px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-header[_ngcontent-%COMP%]   fusion-icon[class^=warning][_ngcontent-%COMP%]     svg *{fill:var(--neutral-color-700, #FF9403)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:10px;right:15px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]     svg{width:10px;height:10px}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]     svg *{fill:var(--light-color-800, #678099)}[_nghost-%COMP%]   .is-notification[_ngcontent-%COMP%]   .is-notification-content[_ngcontent-%COMP%]{box-sizing:border-box;position:relative;min-height:65px;padding:0 30px 15px}[_nghost-%COMP%]   .is-notification-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:.75;z-index:3010}"], 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:var(--bold-font-family, \"NHaasGroteskTXPro-75Bd\");font-weight:600}:host .is-notification{border-radius:var(--border-radius, 3px)}:host .is-notification{border:1px solid var(--light-color, #E1E6EB)}:host .is-notification{position:fixed;z-index:3011;top:38%;left:0;right:0;width:400px;display:block;margin:auto;text-align:left;background-color:#fff;box-shadow:4px 4px 4px #0000001a}:host .is-notification .is-header{padding:15px 30px 10px}:host .is-notification .is-header fusion-icon[class^=info]{vertical-align:sub;margin-right:5px}:host .is-notification .is-header fusion-icon[class^=info] ::ng-deep svg{width:20px;height:20px}:host .is-notification .is-header fusion-icon[class^=info] ::ng-deep svg *{fill:var(--light-color-800, #678099)}:host .is-notification .is-header fusion-icon[class^=error]{vertical-align:sub;margin-right:5px}:host .is-notification .is-header fusion-icon[class^=error] ::ng-deep svg{width:20px;height:20px}:host .is-notification .is-header fusion-icon[class^=error] ::ng-deep svg *{fill:var(--negative-color, #e1174c)}:host .is-notification .is-header fusion-icon[class^=success]{vertical-align:sub;margin-right:5px}:host .is-notification .is-header fusion-icon[class^=success] ::ng-deep svg{width:20px;height:20px}:host .is-notification .is-header fusion-icon[class^=success] ::ng-deep svg *{fill:var(--positive-color, #13C7C8)}:host .is-notification .is-header fusion-icon[class^=warning]{vertical-align:sub;margin-right:5px}:host .is-notification .is-header fusion-icon[class^=warning] ::ng-deep svg{width:20px;height:20px}:host .is-notification .is-header fusion-icon[class^=warning] ::ng-deep svg *{fill:var(--neutral-color-700, #FF9403)}:host .is-notification fusion-icon[class^=close]{cursor:pointer;position:absolute;top:10px;right:15px}:host .is-notification fusion-icon[class^=close] ::ng-deep svg{width:10px;height:10px}:host .is-notification fusion-icon[class^=close] ::ng-deep svg *{fill:var(--light-color-800, #678099)}:host .is-notification .is-notification-content{box-sizing:border-box;position:relative;min-height:65px;padding:0 30px 15px}:host .is-notification-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:.75;z-index:3010}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NotificationComponent, { className: "NotificationComponent", filePath: "notification.component.ts", lineNumber: 11 }); })();

class NotificationModule {
    static { this.ɵfac = function NotificationModule_Factory(t) { return new (t || NotificationModule)(); }; }
    static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: NotificationModule }); }
    static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, ModalModule, IconModule] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotificationModule, [{
        type: NgModule,
        args: [{
                declarations: [NotificationComponent],
                exports: [NotificationComponent],
                imports: [CommonModule, ModalModule, IconModule]
            }]
    }], null, null); })();
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(NotificationModule, { declarations: [NotificationComponent], imports: [CommonModule, ModalModule, IconModule], exports: [NotificationComponent] }); })();

/**
 * Generated bundle index. Do not edit.
 */

export { NotificationComponent, NotificationModule };
//# sourceMappingURL=ironsource-fusion-ui-components-notification-v1.mjs.map
