import { ChangeDetectionStrategy, Component } from '@angular/core';
import { LoaderBaseComponent } from '@ironsource/fusion-ui/components/loader/common/base';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/components/icon/v1";
const _c0 = ["*"];
const _c1 = (a0, a1, a2) => [a0, a1, a2];
function LoaderComponent_div_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0, 6, 0);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("ngComponentOutlet", ctx_r0.componentType);
} }
function LoaderComponent_div_0_ng_container_2_fusion_icon_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 9);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("name", ctx_r0.loaderIconName);
} }
function LoaderComponent_div_0_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, LoaderComponent_div_0_ng_container_2_fusion_icon_1_Template, 1, 1, "fusion-icon", 7);
    i0.ɵɵelementStart(2, "span", 8, 1);
    i0.ɵɵprojection(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.loaderIconName);
} }
function LoaderComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵtemplate(1, LoaderComponent_div_0_ng_container_1_Template, 2, 1, "ng-container", 4)(2, LoaderComponent_div_0_ng_container_2_Template, 5, 1, "ng-container", 5);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(3, _c1, ctx_r0.size, ctx_r0.color, ctx_r0.loaderPosition));
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.componentType);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", !ctx_r0.componentType);
} }
export class LoaderComponent extends LoaderBaseComponent {
    ngOnInit() {
        this.loaderIconName =
            this.size === 'inline' ? { iconName: 'loading-rotate', iconVersion: 'v2' } : { iconName: 'loader-dots-v4', iconVersion: 'v2' };
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵLoaderComponent_BaseFactory; return function LoaderComponent_Factory(__ngFactoryType__) { return (ɵLoaderComponent_BaseFactory || (ɵLoaderComponent_BaseFactory = i0.ɵɵgetInheritedFactory(LoaderComponent)))(__ngFactoryType__ || LoaderComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LoaderComponent, selectors: [["fusion-loader"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0, decls: 1, vars: 1, consts: [["customLoader", ""], ["ref", ""], ["class", "is-loader", 3, "ngClass", 4, "ngIf"], [1, "is-loader", 3, "ngClass"], [3, "ngComponentOutlet", 4, "ngIf"], [4, "ngIf"], [3, "ngComponentOutlet"], ["class", "fu-loader", 3, "name", 4, "ngIf"], [1, "is-loader-content"], [1, "fu-loader", 3, "name"]], template: function LoaderComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵtemplate(0, LoaderComponent_div_0_Template, 3, 7, "div", 2);
        } if (rf & 2) {
            i0.ɵɵproperty("ngIf", ctx.status);
        } }, dependencies: [i1.NgClass, i1.NgComponentOutlet, i1.NgIf, i2.IconComponent], styles: ["[_nghost-%COMP%]   .is-loader[_ngcontent-%COMP%]   .is-loader-content[_ngcontent-%COMP%]{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}[_nghost-%COMP%]   .is-loader[_ngcontent-%COMP%]{z-index:1000!important}[_nghost-%COMP%]{display:block}[_nghost-%COMP%]   .is-loader[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;color:var(--fu-light-900, #7b838c)}[_nghost-%COMP%]   .is-loader.blue[_ngcontent-%COMP%]{color:var(--fu-primary-500, #3083ff)}[_nghost-%COMP%]   .is-loader.white[_ngcontent-%COMP%]{color:var(--fu-white, #ffffff)}[_nghost-%COMP%]   .is-loader[_ngcontent-%COMP%]   fusion-icon.fu-loader[_ngcontent-%COMP%]     svg{width:40px}[_nghost-%COMP%]   .is-loader[_ngcontent-%COMP%]   fusion-icon.fu-loader[_ngcontent-%COMP%]     svg *{fill:currentColor}[_nghost-%COMP%]   .is-loader[_ngcontent-%COMP%]   .is-loader-content[_ngcontent-%COMP%]{margin-top:15px}[_nghost-%COMP%]   .is-loader.small[_ngcontent-%COMP%]   fusion-icon.fu-loader[_ngcontent-%COMP%]     svg{width:30px}[_nghost-%COMP%]   .is-loader.small[_ngcontent-%COMP%]   fusion-icon.fu-loader[_ngcontent-%COMP%]     svg *{fill:currentColor}[_nghost-%COMP%]   .is-loader.inline[_ngcontent-%COMP%]   fusion-icon[class^=fu-loader][_ngcontent-%COMP%]{display:block;position:absolute;right:0}[_nghost-%COMP%]   .is-loader.inline[_ngcontent-%COMP%]   fusion-icon[class^=fu-loader][_ngcontent-%COMP%]     svg{width:32px;height:32px}[_nghost-%COMP%]   .is-loader.inline[_ngcontent-%COMP%]   fusion-icon[class^=fu-loader][_ngcontent-%COMP%]     svg *{fill:currentColor}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoaderComponent, [{
        type: Component,
        args: [{ selector: 'fusion-loader', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"status\" class=\"is-loader\" [ngClass]=\"[size, color, loaderPosition]\">\n    <ng-container *ngIf=\"componentType\" [ngComponentOutlet]=\"componentType\" #customLoader></ng-container>\n    <ng-container *ngIf=\"!componentType\">\n        <fusion-icon *ngIf=\"loaderIconName\" class=\"fu-loader\" [name]=\"loaderIconName\"></fusion-icon>\n        <span class=\"is-loader-content\" #ref><ng-content></ng-content></span>\n    </ng-container>\n</div>\n", styles: [":host .is-loader .is-loader-content{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}:host .is-loader{z-index:1000!important}:host{display:block}:host .is-loader{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;color:var(--fu-light-900, #7b838c)}:host .is-loader.blue{color:var(--fu-primary-500, #3083ff)}:host .is-loader.white{color:var(--fu-white, #ffffff)}:host .is-loader fusion-icon.fu-loader ::ng-deep svg{width:40px}:host .is-loader fusion-icon.fu-loader ::ng-deep svg *{fill:currentColor}:host .is-loader .is-loader-content{margin-top:15px}:host .is-loader.small fusion-icon.fu-loader ::ng-deep svg{width:30px}:host .is-loader.small fusion-icon.fu-loader ::ng-deep svg *{fill:currentColor}:host .is-loader.inline fusion-icon[class^=fu-loader]{display:block;position:absolute;right:0}:host .is-loader.inline fusion-icon[class^=fu-loader] ::ng-deep svg{width:32px;height:32px}:host .is-loader.inline fusion-icon[class^=fu-loader] ::ng-deep svg *{fill:currentColor}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LoaderComponent, { className: "LoaderComponent", filePath: "loader.component.ts", lineNumber: 10 }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Z1c2lvbi11aS9jb21wb25lbnRzL2xvYWRlci92Mi9sb2FkZXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZnVzaW9uLXVpL2NvbXBvbmVudHMvbG9hZGVyL2NvbW1vbi9iYXNlL2xvYWRlci5iYXNlLmNvb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