import * as i0 from '@angular/core';
import { EventEmitter, Component, Input, Output, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { ModalBaseComponent } from '@ironsource/fusion-ui/components/modal/common/base';
export { ModalService } from '@ironsource/fusion-ui/components/modal/common/base';
import * as i2 from '@ironsource/fusion-ui/components/button/v2';
import { ButtonModule } from '@ironsource/fusion-ui/components/button/v2';
import * as i2$1 from '@ironsource/fusion-ui/components/icon/v1';
import { IconModule } from '@ironsource/fusion-ui/components/icon/v1';
import { LoaderModule } from '@ironsource/fusion-ui/components/loader/v2';

const _c0$3 = a0 => ({ small: a0 });
function ModalFooterComponent_fusion_button_4_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-button", 5);
    i0.ɵɵlistener("click", function ModalFooterComponent_fusion_button_4_Template_fusion_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closeButtonClicked.emit()); });
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵclassMap(ctx_r0.cancelButtonClass);
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$3, ctx_r0.notificationFooter));
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r0.cancelButtonText, " ");
} }
class ModalFooterComponent {
    constructor() {
        this.loading = false;
        this.error = '';
        this.saveButtonText = 'Save';
        this.saveButtonClass = 'primary';
        this.saveButtonDisabled = false;
        this.saveButtonLoading = false;
        this.cancelButtonText = 'Cancel';
        this.cancelButtonClass = 'secondary';
        // eslint-disable-next-line
        this.onSave = new EventEmitter();
        // eslint-disable-next-line
        this.closeButtonClicked = new EventEmitter();
    }
    static { this.ɵfac = function ModalFooterComponent_Factory(t) { return new (t || ModalFooterComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalFooterComponent, selectors: [["fusion-modal-footer"]], inputs: { loading: "loading", error: "error", saveButtonText: "saveButtonText", saveButtonClass: "saveButtonClass", saveButtonDisabled: "saveButtonDisabled", saveButtonLoading: "saveButtonLoading", cancelButtonText: "cancelButtonText", cancelButtonClass: "cancelButtonClass", cancelButtonHidden: "cancelButtonHidden", notificationFooter: "notificationFooter" }, outputs: { onSave: "onSave", closeButtonClicked: "closeButtonClicked" }, decls: 7, vars: 10, consts: [[1, "modal-footer"], [1, "footer"], [1, "fu-error-message"], [3, "class", "ngClass", "click", 4, "ngIf"], [3, "ngClass", "loading", "disabled", "click"], [3, "ngClass", "click"]], template: function ModalFooterComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "span", 2);
            i0.ɵɵtext(3);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(4, ModalFooterComponent_fusion_button_4_Template, 2, 6, "fusion-button", 3);
            i0.ɵɵelementStart(5, "fusion-button", 4);
            i0.ɵɵlistener("click", function ModalFooterComponent_Template_fusion_button_click_5_listener() { return ctx.onSave.emit(); });
            i0.ɵɵtext(6);
            i0.ɵɵelementEnd()()();
        } if (rf & 2) {
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate(ctx.error);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", !ctx.cancelButtonHidden);
            i0.ɵɵadvance();
            i0.ɵɵclassMap(ctx.saveButtonClass);
            i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c0$3, ctx.notificationFooter))("loading", ctx.saveButtonLoading)("disabled", ctx.saveButtonDisabled || ctx.loading || !!ctx.error);
            i0.ɵɵadvance();
            i0.ɵɵtextInterpolate1(" ", ctx.saveButtonText, " ");
        } }, dependencies: [i1.NgClass, i1.NgIf, i2.ButtonComponent], styles: ["[_nghost-%COMP%]   .modal-footer[_ngcontent-%COMP%]   .fu-error-message[_ngcontent-%COMP%]{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]   .modal-footer[_ngcontent-%COMP%]{border-top:solid 1px var(--fu-light-300, #e5e7e9);padding:12px 15px;box-sizing:border-box}[_nghost-%COMP%]   .modal-footer[_ngcontent-%COMP%]   div.footer[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%]   .modal-footer[_ngcontent-%COMP%]   div.footer[_ngcontent-%COMP%]   fusion-button[_ngcontent-%COMP%] + fusion-button[_ngcontent-%COMP%]{margin-left:7px}[_nghost-%COMP%]   .modal-footer[_ngcontent-%COMP%]   .fu-error-message[_ngcontent-%COMP%]{font-size:13px;color:var(--fu-negative-500, #ff6a63);margin-right:10px}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalFooterComponent, [{
        type: Component,
        args: [{ selector: 'fusion-modal-footer', template: "<div class=\"modal-footer\">\n    <div class=\"footer\">\n        <span class=\"fu-error-message\">{{ error }}</span>\n        <fusion-button\n            [class]=\"cancelButtonClass\"\n            [ngClass]=\"{small: notificationFooter}\"\n            (click)=\"closeButtonClicked.emit()\"\n            *ngIf=\"!cancelButtonHidden\"\n        >\n            {{ cancelButtonText }}\n        </fusion-button>\n        <fusion-button\n            [class]=\"saveButtonClass\"\n            [ngClass]=\"{small: notificationFooter}\"\n            [loading]=\"saveButtonLoading\"\n            [disabled]=\"saveButtonDisabled || loading || !!error\"\n            (click)=\"onSave.emit()\"\n        >\n            {{ saveButtonText }}\n        </fusion-button>\n    </div>\n</div>\n", styles: [":host .modal-footer .fu-error-message{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}:host *{box-sizing:border-box}:host .modal-footer{border-top:solid 1px var(--fu-light-300, #e5e7e9);padding:12px 15px;box-sizing:border-box}:host .modal-footer div.footer{text-align:right}:host .modal-footer div.footer fusion-button+fusion-button{margin-left:7px}:host .modal-footer .fu-error-message{font-size:13px;color:var(--fu-negative-500, #ff6a63);margin-right:10px}\n"] }]
    }], null, { loading: [{
            type: Input
        }], error: [{
            type: Input
        }], saveButtonText: [{
            type: Input
        }], saveButtonClass: [{
            type: Input
        }], saveButtonDisabled: [{
            type: Input
        }], saveButtonLoading: [{
            type: Input
        }], cancelButtonText: [{
            type: Input
        }], cancelButtonClass: [{
            type: Input
        }], cancelButtonHidden: [{
            type: Input
        }], notificationFooter: [{
            type: Input
        }], onSave: [{
            type: Output
        }], closeButtonClicked: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModalFooterComponent, { className: "ModalFooterComponent", filePath: "components/modal-footer/modal-footer.component.ts", lineNumber: 8 }); })();

function ModalContentComponent_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "div", 3);
} }
const _c0$2 = ["*"];
class ModalContentComponent {
    constructor() {
        this.waiting = false;
    }
    static { this.ɵfac = function ModalContentComponent_Factory(t) { return new (t || ModalContentComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalContentComponent, selectors: [["fusion-modal-content"]], inputs: { padding: "padding", waiting: "waiting" }, ngContentSelectors: _c0$2, decls: 4, vars: 3, consts: [[1, "modal-content"], [1, "content"], ["class", "is-in-waiting", 4, "ngIf"], [1, "is-in-waiting"]], template: function ModalContentComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
            i0.ɵɵprojection(2);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(3, ModalContentComponent_div_3_Template, 1, 0, "div", 2);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵstyleProp("padding", ctx.padding);
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("ngIf", ctx.waiting);
        } }, dependencies: [i1.NgIf], styles: ["[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]{display:block;overflow-y:auto}.fu-has-height[_nghost-%COMP%]{min-height:calc(100% - 105px)}[_nghost-%COMP%]   .modal-content[_ngcontent-%COMP%]{position:relative;padding:24px 32px 40px}[_nghost-%COMP%]   .modal-content[_ngcontent-%COMP%]   .is-in-waiting[_ngcontent-%COMP%]{position:absolute;inset:0;background-color:var(--fu-white, #ffffff);opacity:.5;display:block}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalContentComponent, [{
        type: Component,
        args: [{ selector: 'fusion-modal-content', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"modal-content\" [style.padding]=\"padding\">\n    <div class=\"content\">\n        <ng-content></ng-content>\n    </div>\n    <div class=\"is-in-waiting\" *ngIf=\"waiting\"></div>\n</div>\n", styles: [":host *{box-sizing:border-box}:host{display:block;overflow-y:auto}:host.fu-has-height{min-height:calc(100% - 105px)}:host .modal-content{position:relative;padding:24px 32px 40px}:host .modal-content .is-in-waiting{position:absolute;inset:0;background-color:var(--fu-white, #ffffff);opacity:.5;display:block}\n"] }]
    }], null, { padding: [{
            type: Input
        }], waiting: [{
            type: Input
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModalContentComponent, { className: "ModalContentComponent", filePath: "components/modal-content/modal-content.component.ts", lineNumber: 9 }); })();

const _c0$1 = a0 => ({ "no-border-bottom": a0 });
const _c1$1 = () => ({ iconName: "close", iconVersion: "v2" });
function ModalHeaderComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 1)(1, "div")(2, "span");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "fusion-icon", 2);
    i0.ɵɵlistener("click", function ModalHeaderComponent_div_0_Template_fusion_icon_click_4_listener() { i0.ɵɵrestoreView(_r2); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closed.emit()); });
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0$1, ctx_r0.noHeaderBorder));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(ctx_r0.headerText);
    i0.ɵɵadvance();
    i0.ɵɵproperty("name", i0.ɵɵpureFunction0(5, _c1$1));
} }
class ModalHeaderComponent {
    constructor() {
        this.noHeaderBorder = false;
        this.closed = new EventEmitter();
    }
    static { this.ɵfac = function ModalHeaderComponent_Factory(t) { return new (t || ModalHeaderComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalHeaderComponent, selectors: [["fusion-modal-header"]], inputs: { headerText: "headerText", noHeaderBorder: "noHeaderBorder" }, outputs: { closed: "closed" }, decls: 1, vars: 1, consts: [["class", "modal-header", 3, "ngClass", 4, "ngIf"], [1, "modal-header", 3, "ngClass"], [1, "close", 3, "name", "click"]], template: function ModalHeaderComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, ModalHeaderComponent_div_0_Template, 5, 6, "div", 0);
        } if (rf & 2) {
            i0.ɵɵproperty("ngIf", ctx.headerText);
        } }, dependencies: [i1.NgClass, i1.NgIf, i2$1.IconComponent], styles: ["[_nghost-%COMP%]   .modal-header[_ngcontent-%COMP%]{font-size:15px;font-family:NHaasGroteskDSPro-75Bd,sans-serif;font-weight:400}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]   .modal-header[_ngcontent-%COMP%]{box-sizing:border-box;color:var(--fu-dark-300, #313d91);height:49px;padding:15px 32px;border-bottom:solid 1px var(--fu-light-300, #e5e7e9)}[_nghost-%COMP%]   .modal-header[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]{cursor:pointer;position:absolute;right:23px;top:18px}[_nghost-%COMP%]   .modal-header[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]     svg{width:15px;height:15px}[_nghost-%COMP%]   .modal-header[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]     svg *{fill:var(--fu-light-700, #a9afb4)}[_nghost-%COMP%]   .modal-header[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]:hover     svg{width:15px;height:15px}[_nghost-%COMP%]   .modal-header[_ngcontent-%COMP%]   fusion-icon[class^=close][_ngcontent-%COMP%]:hover     svg *{fill:var(--fu-light-900, #7b838c)}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalHeaderComponent, [{
        type: Component,
        args: [{ selector: 'fusion-modal-header', template: "<div class=\"modal-header\" [ngClass]=\"{'no-border-bottom': noHeaderBorder}\" *ngIf=\"headerText\">\n    <div>\n        <span>{{ headerText }}</span>\n        <fusion-icon class=\"close\" [name]=\"{iconName: 'close', iconVersion: 'v2'}\" (click)=\"closed.emit()\"></fusion-icon>\n    </div>\n</div>\n", styles: [":host .modal-header{font-size:15px;font-family:NHaasGroteskDSPro-75Bd,sans-serif;font-weight:400}:host *{box-sizing:border-box}:host .modal-header{box-sizing:border-box;color:var(--fu-dark-300, #313d91);height:49px;padding:15px 32px;border-bottom:solid 1px var(--fu-light-300, #e5e7e9)}:host .modal-header fusion-icon[class^=close]{cursor:pointer;position:absolute;right:23px;top:18px}:host .modal-header fusion-icon[class^=close] ::ng-deep svg{width:15px;height:15px}:host .modal-header fusion-icon[class^=close] ::ng-deep svg *{fill:var(--fu-light-700, #a9afb4)}:host .modal-header fusion-icon[class^=close]:hover ::ng-deep svg{width:15px;height:15px}:host .modal-header fusion-icon[class^=close]:hover ::ng-deep svg *{fill:var(--fu-light-900, #7b838c)}\n"] }]
    }], null, { headerText: [{
            type: Input
        }], noHeaderBorder: [{
            type: Input
        }], closed: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModalHeaderComponent, { className: "ModalHeaderComponent", filePath: "components/modal-header/modal-header.component.ts", lineNumber: 8 }); })();

function ModalComponent_fusion_modal_content_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
const _c0 = a0 => ({ "fu-has-height": a0 });
function ModalComponent_fusion_modal_content_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "fusion-modal-content", 9);
    i0.ɵɵtemplate(1, ModalComponent_fusion_modal_content_5_ng_container_1_Template, 1, 0, "ng-container", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    const _r5 = i0.ɵɵreference(8);
    i0.ɵɵproperty("padding", ctx_r2.padding)("waiting", ctx_r2.waiting)("ngClass", i0.ɵɵpureFunction1(4, _c0, !!ctx_r2.height));
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngTemplateOutlet", _r5);
} }
function ModalComponent_ng_container_6_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function ModalComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, ModalComponent_ng_container_6_ng_container_1_Template, 1, 0, "ng-container", 10);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r5 = i0.ɵɵreference(8);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngTemplateOutlet", _r5);
} }
function ModalComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵprojection(0);
} }
function ModalComponent_fusion_modal_footer_9_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-modal-footer", 11);
    i0.ɵɵlistener("onSave", function ModalComponent_fusion_modal_footer_9_Template_fusion_modal_footer_onSave_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r9.onSave.emit()); })("closeButtonClicked", function ModalComponent_fusion_modal_footer_9_Template_fusion_modal_footer_closeButtonClicked_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r11 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r11.close()); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext();
    i0.ɵɵproperty("loading", ctx_r6.loading)("error", ctx_r6.error)("saveButtonText", ctx_r6.saveButtonText)("saveButtonDisabled", ctx_r6.saveButtonDisabled)("cancelButtonHidden", ctx_r6.cancelButtonHidden)("cancelButtonText", ctx_r6.cancelButtonText)("saveButtonLoading", ctx_r6.waiting);
} }
const _c1 = (a0, a1) => ({ waiting: a0, loading: a1 });
const _c2 = ["*"];
class ModalComponent extends ModalBaseComponent {
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵModalComponent_BaseFactory; return function ModalComponent_Factory(t) { return (ɵModalComponent_BaseFactory || (ɵModalComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ModalComponent)))(t || ModalComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalComponent, selectors: [["fusion-modal"]], features: [i0.ɵɵProvidersFeature([
                {
                    provide: NG_VALUE_ACCESSOR,
                    useExisting: forwardRef(() => ModalComponent),
                    multi: true
                }
            ]), i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c2, decls: 10, vars: 17, consts: [[1, "modal", 3, "ngClass"], ["modalHolder", ""], [1, "modal-body"], ["modalBody", ""], [3, "headerText", "noHeaderBorder", "closed"], [3, "padding", "waiting", "ngClass", 4, "ngIf"], [4, "ngIf"], ["content", ""], [3, "loading", "error", "saveButtonText", "saveButtonDisabled", "cancelButtonHidden", "cancelButtonText", "saveButtonLoading", "onSave", "closeButtonClicked", 4, "ngIf"], [3, "padding", "waiting", "ngClass"], [4, "ngTemplateOutlet"], [3, "loading", "error", "saveButtonText", "saveButtonDisabled", "cancelButtonHidden", "cancelButtonText", "saveButtonLoading", "onSave", "closeButtonClicked"]], template: function ModalComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵelementStart(0, "div", 0, 1)(2, "div", 2, 3)(4, "fusion-modal-header", 4);
            i0.ɵɵlistener("closed", function ModalComponent_Template_fusion_modal_header_closed_4_listener() { return ctx.close(); });
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(5, ModalComponent_fusion_modal_content_5_Template, 2, 6, "fusion-modal-content", 5)(6, ModalComponent_ng_container_6_Template, 2, 1, "ng-container", 6)(7, ModalComponent_ng_template_7_Template, 1, 0, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor)(9, ModalComponent_fusion_modal_footer_9_Template, 1, 7, "fusion-modal-footer", 8);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(14, _c1, ctx.waiting, ctx.loading));
            i0.ɵɵadvance(2);
            i0.ɵɵstyleProp("width", ctx.width)("height", ctx.height);
            i0.ɵɵclassProp("has-footer", ctx.footer)("has-header", ctx.headerText);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("headerText", ctx.headerText)("noHeaderBorder", ctx.noHeaderBorder);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.headerText || ctx.footer);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", !ctx.headerText && !ctx.footer);
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("ngIf", ctx.footer);
        } }, dependencies: [i1.NgClass, i1.NgIf, i1.NgTemplateOutlet, ModalFooterComponent, ModalContentComponent, ModalHeaderComponent], styles: ["[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]{margin:0;padding:0;vertical-align:initial;text-align:initial}[_nghost-%COMP%]{position:fixed;inset:0;background:rgba(9,13,50,.3);overflow-x:auto;z-index:3010}[_nghost-%COMP%]   .modal[_ngcontent-%COMP%]{height:calc(100vh - 20px);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 0;overflow:auto}[_nghost-%COMP%]   .modal[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]{position:relative;background:#fff;margin:0 auto;box-shadow:0 0 20px #1e1e1e0d;border-radius:24px;display:grid}[_nghost-%COMP%]   .modal[_ngcontent-%COMP%]   .modal-body.has-header[_ngcontent-%COMP%]{grid-template-rows:49px 1fr 20px}[_nghost-%COMP%]   .modal[_ngcontent-%COMP%]   .modal-body.has-footer[_ngcontent-%COMP%]{grid-template-rows:20px 1fr 56px}[_nghost-%COMP%]   .modal[_ngcontent-%COMP%]   .modal-body.has-footer.has-header[_ngcontent-%COMP%]{grid-template-rows:49px 1fr 56px}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalComponent, [{
        type: Component,
        args: [{ selector: 'fusion-modal', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
                    {
                        provide: NG_VALUE_ACCESSOR,
                        useExisting: forwardRef(() => ModalComponent),
                        multi: true
                    }
                ], template: "<div class=\"modal\" [ngClass]=\"{waiting: waiting, loading: loading}\" #modalHolder>\n    <div class=\"modal-body\" [class.has-footer]=\"footer\" [class.has-header]=\"headerText\" [style.width]=\"width\" [style.height]=\"height\" #modalBody>\n\n        <fusion-modal-header [headerText]=\"headerText\" [noHeaderBorder]=\"noHeaderBorder\" (closed)=\"close()\"></fusion-modal-header>\n\n        <fusion-modal-content\n            *ngIf=\"headerText || footer\"\n            [padding]=\"padding\"\n            [waiting]=\"waiting\"\n            [ngClass]=\"{'fu-has-height': !!height}\"\n        >\n            <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n        </fusion-modal-content>\n\n        <ng-container *ngIf=\"!headerText && !footer\">\n            <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n        </ng-container>\n\n        <!--can use <ng-content> tag twice in html page unless we use select attribute -->\n        <ng-template #content>\n            <ng-content></ng-content>\n        </ng-template>\n\n        <fusion-modal-footer\n            *ngIf=\"footer\"\n            [loading]=\"loading\"\n            [error]=\"error\"\n            [saveButtonText]=\"saveButtonText\"\n            [saveButtonDisabled]=\"saveButtonDisabled\"\n            [cancelButtonHidden]=\"cancelButtonHidden\"\n            [cancelButtonText]=\"cancelButtonText\"\n            (onSave)=\"onSave.emit()\"\n            (closeButtonClicked)=\"close()\"\n            [saveButtonLoading]=\"waiting\"\n        ></fusion-modal-footer>\n\n    </div>\n</div>\n\n", styles: [":host *{box-sizing:border-box}:host{margin:0;padding:0;vertical-align:initial;text-align:initial}:host{position:fixed;inset:0;background:rgba(9,13,50,.3);overflow-x:auto;z-index:3010}:host .modal{height:calc(100vh - 20px);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 0;overflow:auto}:host .modal .modal-body{position:relative;background:#fff;margin:0 auto;box-shadow:0 0 20px #1e1e1e0d;border-radius:24px;display:grid}:host .modal .modal-body.has-header{grid-template-rows:49px 1fr 20px}:host .modal .modal-body.has-footer{grid-template-rows:20px 1fr 56px}:host .modal .modal-body.has-footer.has-header{grid-template-rows:49px 1fr 56px}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModalComponent, { className: "ModalComponent", filePath: "modal.component.ts", lineNumber: 18 }); })();

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

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

export { ModalComponent, ModalContentComponent, ModalFooterComponent, ModalHeaderComponent, ModalModule };
//# sourceMappingURL=ironsource-fusion-ui-components-modal-v2.mjs.map
