import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, forwardRef, Inject, Injector, Input, Output, Renderer2, ViewChild } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { DOCUMENT } from '@angular/common';
import { BehaviorSubject, Subject } from 'rxjs';
import { UniqueIdService } from '@ironsource/fusion-ui/services/unique-id';
import { LogService } from '@ironsource/fusion-ui/services/log';
import { WindowService } from '@ironsource/fusion-ui/services/window';
import { getDefaultCssUnit } from './modal-utils';
import { takeUntil } from 'rxjs/operators';
import { isNullOrUndefined } from '@ironsource/fusion-ui/utils';
import { ModalTestIdModifiers } from '@ironsource/fusion-ui/entities';
import { TestIdsService } from '@ironsource/fusion-ui/services/test-ids';
import * as i0 from "@angular/core";
import * as i1 from "@ironsource/fusion-ui/services/unique-id";
import * as i2 from "@ironsource/fusion-ui/services/window";
import * as i3 from "@ironsource/fusion-ui/services/log";
import * as i4 from "@angular/common";
import * as i5 from "./components/modal-footer/modal-footer.component";
import * as i6 from "./components/modal-content/modal-content.component";
import * as i7 from "./components/modal-header/modal-header.component";
import * as i8 from "@ironsource/fusion-ui/pipes/generic";
const _c0 = ["modalBody"];
const _c1 = ["modalHolder"];
function ModalComponent_fusion_modal_content_6_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
const _c2 = a0 => ({ "fu-has-height": a0 });
function ModalComponent_fusion_modal_content_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "fusion-modal-content", 9);
    i0.ɵɵpipe(1, "generic");
    i0.ɵɵtemplate(2, ModalComponent_fusion_modal_content_6_ng_container_2_Template, 1, 0, "ng-container", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    const _r5 = i0.ɵɵreference(9);
    i0.ɵɵproperty("pending", ctx_r2.submitPending)("ngClass", i0.ɵɵpureFunction1(8, _c2, !!(ctx_r2.configuration == null ? null : ctx_r2.configuration.height)));
    i0.ɵɵattribute("data-testid", i0.ɵɵpipeBind3(1, 4, ctx_r2.testIdsService.getTestAttribute.bind(ctx_r2), ctx_r2.testId, ctx_r2.modalTestIdModifiers.MODAL_CONTENT));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngTemplateOutlet", _r5);
} }
function ModalComponent_ng_container_7_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function ModalComponent_ng_container_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, ModalComponent_ng_container_7_ng_container_1_Template, 1, 0, "ng-container", 10);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r5 = i0.ɵɵreference(9);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngTemplateOutlet", _r5);
} }
function ModalComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵprojection(0);
} }
function ModalComponent_fusion_modal_footer_10_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-modal-footer", 11);
    i0.ɵɵlistener("primaryButtonClicked", function ModalComponent_fusion_modal_footer_10_Template_fusion_modal_footer_primaryButtonClicked_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r9.onClose(true, "submit")); })("closeButtonClicked", function ModalComponent_fusion_modal_footer_10_Template_fusion_modal_footer_closeButtonClicked_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r11 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r11.onClose(true, "close")); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext();
    i0.ɵɵclassProp("fu-alignment-left", ctx_r6.configuration == null ? null : ctx_r6.configuration.footerAlignLeft)("fu-small", ctx_r6.configuration == null ? null : ctx_r6.configuration.footerSmall);
    i0.ɵɵproperty("error", ctx_r6.configuration == null ? null : ctx_r6.configuration.error)("submitButton", ctx_r6.configuration == null ? null : ctx_r6.configuration.submitButton)("cancelButton", ctx_r6.configuration == null ? null : ctx_r6.configuration.cancelButton)("submitButtonPending", ctx_r6.submitPending)("testId", ctx_r6.testId);
} }
const _c3 = ["*"];
export class ModalComponent {
    /** @internal */
    static { this.activeModals = {}; }
    /** @internal */
    set isModalOpen(value) {
        if (!isNullOrUndefined(value)) {
            this.isClosed$.next(!value);
            this.modalOpenListener$.next(value);
        }
    }
    set configuration(config) {
        this.setModalConfiguration(config);
    }
    get configuration() {
        return this._configuration.getValue();
    }
    constructor(document, uidService, elRef, windowRef, logService, renderer, injector) {
        this.document = document;
        this.uidService = uidService;
        this.elRef = elRef;
        this.windowRef = windowRef;
        this.logService = logService;
        this.renderer = renderer;
        this.injector = injector;
        this.submitPending = false; // state for submit pending
        this.openModal = new EventEmitter();
        this.closeModal = new EventEmitter();
        /** @internal */
        this.modalTestIdModifiers = ModalTestIdModifiers;
        /** @internal */
        this.testIdsService = this.injector.get(TestIdsService);
        this._configuration = new BehaviorSubject(null);
        this.isClosed$ = new BehaviorSubject(false);
        this.modalOpenListener$ = new BehaviorSubject(false);
        this.onDestroy$ = new Subject();
        this.uid = this.uidService.getUniqueId().toString();
    }
    ngOnInit() {
        if (!this.configuration.id) {
            this.logService.error(new Error('Modal component must have an id'));
            return;
        }
        if (this.configuration.defaultModalState === 'close') {
            this.onClose(false);
        }
        this.addModal(this);
        this.initListeners();
    }
    ngOnDestroy() {
        this.onDestroy$.next();
        this.onDestroy$.complete();
        this.removeModal(this.configuration.id);
    }
    /** @internal */
    onOpen() {
        this.renderer.setStyle(this.elRef.nativeElement, 'display', 'block');
        this.openModal.emit();
    }
    /** @internal */
    onClose(emitEvent = true, eventType = 'close') {
        if (eventType === 'close') {
            this.renderer.setStyle(this.elRef.nativeElement, 'display', 'none');
        }
        if (emitEvent) {
            this.closeModal.emit(eventType);
        }
    }
    initListeners() {
        this.modalOpenListener$
            .asObservable()
            .pipe(takeUntil(this.onDestroy$))
            .subscribe(val => {
            if (val) {
                this.onModalOpened(this.configuration.id);
            }
        });
        this.isClosed$
            .asObservable()
            .pipe(takeUntil(this.onDestroy$))
            .subscribe((val) => {
            if (val) {
                this.onClose(false);
            }
        });
    }
    addModal(modal) {
        ModalComponent.activeModals[modal.configuration.id] = modal;
    }
    removeModal(id) {
        delete ModalComponent.activeModals[id];
    }
    onModalOpened(id) {
        if (ModalComponent.activeModals[id]) {
            Object.keys(ModalComponent.activeModals).forEach(modalId => {
                if (modalId === id) {
                    ModalComponent.activeModals[modalId].onOpen();
                }
                else {
                    this.onModalClosed(modalId, false);
                }
            });
        }
    }
    onModalClosed(id, emitEvent = true) {
        if (ModalComponent.activeModals[id] && !ModalComponent.activeModals[id].isClosed$.getValue()) {
            ModalComponent.activeModals[id].onClose(emitEvent, 'close');
        }
    }
    setModalConfiguration(config) {
        this._configuration.next({
            id: config?.id ?? this.uid,
            width: getDefaultCssUnit(config?.width),
            height: getDefaultCssUnit(config?.height),
            defaultModalState: config?.defaultModalState ?? 'open',
            hasFooter: config?.hasFooter ?? true,
            footerAlignLeft: config?.footerAlignLeft,
            footerSmall: config?.footerSmall,
            error: config?.error ?? '',
            headerText: config?.headerText ?? '',
            headerInfoText: config?.headerInfoText,
            isHeaderBorder: config?.isHeaderBorder ?? true,
            submitButton: {
                submitButtonText: config?.submitButton?.submitButtonText ?? 'Save',
                submitButtonClass: config?.submitButton?.submitButtonClass ?? (config?.footerSmall ? 'small' : ''),
                submitButtonDisabled: config?.submitButton?.submitButtonDisabled ?? false
            },
            cancelButton: {
                cancelButtonText: config?.cancelButton?.cancelButtonText ?? 'Cancel',
                cancelButtonHidden: config?.cancelButton?.cancelButtonHidden ?? false,
                cancelButtonClass: config?.cancelButton?.cancelButtonClass ?? (config?.footerSmall ? 'transparent third small' : 'transparent third')
            }
        });
    }
    static { this.ɵfac = function ModalComponent_Factory(t) { return new (t || ModalComponent)(i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(i1.UniqueIdService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i2.WindowService), i0.ɵɵdirectiveInject(i3.LogService), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.Injector)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalComponent, selectors: [["fusion-modal"]], viewQuery: function ModalComponent_Query(rf, ctx) { if (rf & 1) {
            i0.ɵɵviewQuery(_c0, 7);
            i0.ɵɵviewQuery(_c1, 7);
        } if (rf & 2) {
            let _t;
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.modalBody = _t.first);
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.modalHolder = _t.first);
        } }, inputs: { submitPending: "submitPending", isModalOpen: "isModalOpen", configuration: "configuration", testId: "testId" }, outputs: { openModal: "openModal", closeModal: "closeModal" }, features: [i0.ɵɵProvidersFeature([
                {
                    provide: NG_VALUE_ACCESSOR,
                    useExisting: forwardRef(() => ModalComponent),
                    multi: true
                }
            ])], ngContentSelectors: _c3, decls: 11, vars: 19, consts: [[1, "modal"], ["modalHolder", ""], [1, "modal-body"], ["modalBody", ""], [3, "testId", "headerText", "infoText", "closeModal"], [3, "pending", "ngClass", 4, "ngIf"], [4, "ngIf"], ["content", ""], [3, "fu-alignment-left", "fu-small", "error", "submitButton", "cancelButton", "submitButtonPending", "testId", "primaryButtonClicked", "closeButtonClicked", 4, "ngIf"], [3, "pending", "ngClass"], [4, "ngTemplateOutlet"], [3, "error", "submitButton", "cancelButton", "submitButtonPending", "testId", "primaryButtonClicked", "closeButtonClicked"]], template: function ModalComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵelementStart(0, "div", 0, 1);
            i0.ɵɵpipe(2, "generic");
            i0.ɵɵelementStart(3, "div", 2, 3)(5, "fusion-modal-header", 4);
            i0.ɵɵlistener("closeModal", function ModalComponent_Template_fusion_modal_header_closeModal_5_listener() { return ctx.onClose(true, "close"); });
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(6, ModalComponent_fusion_modal_content_6_Template, 3, 10, "fusion-modal-content", 5)(7, ModalComponent_ng_container_7_Template, 2, 1, "ng-container", 6)(8, ModalComponent_ng_template_8_Template, 1, 0, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor)(10, ModalComponent_fusion_modal_footer_10_Template, 1, 9, "fusion-modal-footer", 8);
            i0.ɵɵelementEnd()();
        } if (rf & 2) {
            i0.ɵɵattribute("data-testid", i0.ɵɵpipeBind3(2, 15, ctx.testIdsService.getTestAttribute.bind(ctx), ctx.testId, ctx.modalTestIdModifiers.MODAL));
            i0.ɵɵadvance(3);
            i0.ɵɵstyleProp("width", ctx.configuration == null ? null : ctx.configuration.width)("height", ctx.configuration == null ? null : ctx.configuration.height);
            i0.ɵɵclassProp("has-footer", ctx.configuration == null ? null : ctx.configuration.hasFooter)("has-header", ctx.configuration == null ? null : ctx.configuration.headerText);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("testId", ctx.testId)("headerText", ctx.configuration == null ? null : ctx.configuration.headerText)("infoText", ctx.configuration == null ? null : ctx.configuration.headerInfoText);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", (ctx.configuration == null ? null : ctx.configuration.headerText) || (ctx.configuration == null ? null : ctx.configuration.hasFooter));
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", !(ctx.configuration == null ? null : ctx.configuration.headerText) && !(ctx.configuration == null ? null : ctx.configuration.hasFooter));
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("ngIf", ctx.configuration == null ? null : ctx.configuration.hasFooter);
        } }, dependencies: [i4.NgClass, i4.NgIf, i4.NgTemplateOutlet, i5.ModalFooterComponent, i6.ModalContentComponent, i7.ModalHeaderComponent, i8.GenericPipe], styles: ["@font-face{font-family:NHaasGroteskDSPro;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.ttf) format(\"truetype\")}@font-face{font-family:NHaasGroteskDSPro-65Md;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue-Medium;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.ttf) format(\"truetype\")}.font-heading-6[_ngcontent-%COMP%], .font-heading-5[_ngcontent-%COMP%], .font-heading-4[_ngcontent-%COMP%], .font-heading-3[_ngcontent-%COMP%], .font-heading-2[_ngcontent-%COMP%], .font-heading-1[_ngcontent-%COMP%]{font-family:NHaasGroteskDSPro,sans-serif}.font-heading-1[_ngcontent-%COMP%]{font-size:60px}.font-heading-2[_ngcontent-%COMP%]{font-size:32px}.font-heading-3[_ngcontent-%COMP%]{font-size:22px}.font-heading-4[_ngcontent-%COMP%]{font-size:18px}.font-heading-5[_ngcontent-%COMP%]{font-size:15px}.font-heading-6[_ngcontent-%COMP%]{font-size:13px}.font-heading-label[_ngcontent-%COMP%]{font-size:11px;font-family:NHaasGroteskDSPro-65Md,sans-serif;letter-spacing:.25px}.font-caption[_ngcontent-%COMP%], .font-bodyXSmall[_ngcontent-%COMP%], .font-bodySmall[_ngcontent-%COMP%], .font-bodyMedium[_ngcontent-%COMP%], .font-bodyLarge[_ngcontent-%COMP%]{font-family:HelveticaNeue,helvetica,sans-serif;line-height:1.5}.font-bodyXSmallStrong[_ngcontent-%COMP%], .font-bodySmallStrong[_ngcontent-%COMP%], .font-bodyMediumStrong[_ngcontent-%COMP%], .font-bodyLargeStrong[_ngcontent-%COMP%]{font-family:HelveticaNeue-Medium,helvetica,sans-serif;line-height:1.5}.font-bodyLarge[_ngcontent-%COMP%], .font-bodyLargeStrong[_ngcontent-%COMP%]{font-size:16px}.font-bodyMedium[_ngcontent-%COMP%], .font-bodyMediumStrong[_ngcontent-%COMP%]{font-size:14px}.font-bodySmall[_ngcontent-%COMP%], .font-bodySmallStrong[_ngcontent-%COMP%]{font-size:13px;letter-spacing:.24px}.font-bodyXSmall[_ngcontent-%COMP%], .font-bodyXSmallStrong[_ngcontent-%COMP%]{font-size:12px;letter-spacing:.24px}.font-caption[_ngcontent-%COMP%]{font-size:11px}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_shineAnimation{0%{background-position:-750px 0}to{background-position:750px 0}}[_nghost-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.56);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 32px 32px -8px #00000014,0 0 32px -8px #0000001f;border-radius:16px;display:grid}[_nghost-%COMP%]   .modal[_ngcontent-%COMP%]   .modal-body.has-header[_ngcontent-%COMP%]{grid-template-rows:56px 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:56px 1fr 56px}[_nghost-%COMP%]   .modal[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]:has(fusion-modal-footer.fu-small).has-footer{grid-template-rows:20px 1fr 48px}[_nghost-%COMP%]   .modal[_ngcontent-%COMP%]   .modal-body[_ngcontent-%COMP%]:has(fusion-modal-footer.fu-small).has-footer.has-header{grid-template-rows:56px 1fr 48px}.docs-story[_nghost-%COMP%], .docs-story   [_nghost-%COMP%]{position:unset}.docs-story[_nghost-%COMP%]   .modal[_ngcontent-%COMP%], .docs-story   [_nghost-%COMP%]   .modal[_ngcontent-%COMP%]{height:unset;overflow:unset}"], 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\" [attr.data-testid]=\"testIdsService.getTestAttribute.bind(this) | generic:testId:modalTestIdModifiers.MODAL\" #modalHolder>\n    <div class=\"modal-body\" [class.has-footer]=\"configuration?.hasFooter\" [class.has-header]=\"configuration?.headerText\" [style.width]=\"configuration?.width\" [style.height]=\"configuration?.height\" #modalBody>\n\n        <fusion-modal-header [testId]=\"testId\" [headerText]=\"configuration?.headerText\" [infoText]=\"configuration?.headerInfoText\" (closeModal)=\"onClose(true, 'close')\"></fusion-modal-header>\n\n        <fusion-modal-content\n            *ngIf=\"configuration?.headerText || configuration?.hasFooter\"\n            [pending]=\"submitPending\"\n            [ngClass]=\"{'fu-has-height': !!configuration?.height}\"\n            [attr.data-testid]=\"testIdsService.getTestAttribute.bind(this) | generic:testId:modalTestIdModifiers.MODAL_CONTENT\"\n        >\n            <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n        </fusion-modal-content>\n\n        <ng-container *ngIf=\"!configuration?.headerText && !configuration?.hasFooter\">\n            <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n        </ng-container>\n\n        <ng-template #content>\n            <ng-content></ng-content>\n        </ng-template>\n\n        <fusion-modal-footer\n            *ngIf=\"configuration?.hasFooter\"\n            [class.fu-alignment-left]=\"configuration?.footerAlignLeft\"\n            [class.fu-small]=\"configuration?.footerSmall\"\n            [error]=\"configuration?.error\"\n            [submitButton]=\"configuration?.submitButton\"\n            [cancelButton]=\"configuration?.cancelButton\"\n            (primaryButtonClicked)=\"onClose(true, 'submit')\"\n            (closeButtonClicked)=\"onClose(true, 'close')\"\n            [submitButtonPending]=\"submitPending\"\n            [testId]=\"testId\"\n        ></fusion-modal-footer>\n\n    </div>\n</div>\n\n", styles: ["@font-face{font-family:NHaasGroteskDSPro;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.ttf) format(\"truetype\")}@font-face{font-family:NHaasGroteskDSPro-65Md;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue-Medium;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.ttf) format(\"truetype\")}.font-heading-6,.font-heading-5,.font-heading-4,.font-heading-3,.font-heading-2,.font-heading-1{font-family:NHaasGroteskDSPro,sans-serif}.font-heading-1{font-size:60px}.font-heading-2{font-size:32px}.font-heading-3{font-size:22px}.font-heading-4{font-size:18px}.font-heading-5{font-size:15px}.font-heading-6{font-size:13px}.font-heading-label{font-size:11px;font-family:NHaasGroteskDSPro-65Md,sans-serif;letter-spacing:.25px}.font-caption,.font-bodyXSmall,.font-bodySmall,.font-bodyMedium,.font-bodyLarge{font-family:HelveticaNeue,helvetica,sans-serif;line-height:1.5}.font-bodyXSmallStrong,.font-bodySmallStrong,.font-bodyMediumStrong,.font-bodyLargeStrong{font-family:HelveticaNeue-Medium,helvetica,sans-serif;line-height:1.5}.font-bodyLarge,.font-bodyLargeStrong{font-size:16px}.font-bodyMedium,.font-bodyMediumStrong{font-size:14px}.font-bodySmall,.font-bodySmallStrong{font-size:13px;letter-spacing:.24px}.font-bodyXSmall,.font-bodyXSmallStrong{font-size:12px;letter-spacing:.24px}.font-caption{font-size:11px}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes shineAnimation{0%{background-position:-750px 0}to{background-position:750px 0}}:host{position:fixed;inset:0;background:rgba(0,0,0,.56);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 32px 32px -8px #00000014,0 0 32px -8px #0000001f;border-radius:16px;display:grid}:host .modal .modal-body.has-header{grid-template-rows:56px 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:56px 1fr 56px}:host .modal .modal-body:has(fusion-modal-footer.fu-small).has-footer{grid-template-rows:20px 1fr 48px}:host .modal .modal-body:has(fusion-modal-footer.fu-small).has-footer.has-header{grid-template-rows:56px 1fr 48px}:host-context(.docs-story){position:unset}:host-context(.docs-story) .modal{height:unset;overflow:unset}\n"] }]
    }], () => [{ type: Document, decorators: [{
                type: Inject,
                args: [DOCUMENT]
            }] }, { type: i1.UniqueIdService }, { type: i0.ElementRef }, { type: i2.WindowService }, { type: i3.LogService }, { type: i0.Renderer2 }, { type: i0.Injector }], { submitPending: [{
            type: Input
        }], isModalOpen: [{
            type: Input
        }], configuration: [{
            type: Input
        }], testId: [{
            type: Input
        }], openModal: [{
            type: Output
        }], closeModal: [{
            type: Output
        }], modalBody: [{
            type: ViewChild,
            args: ['modalBody', { static: true }]
        }], modalHolder: [{
            type: ViewChild,
            args: ['modalHolder', { static: true }]
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModalComponent, { className: "ModalComponent", filePath: "modal.component.ts", lineNumber: 42 }); })();
//# sourceMappingURL=data:application/json;base64, 