import * as i0 from '@angular/core';
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ViewChild, HostBinding, NgModule } from '@angular/core';
import { BehaviorSubject, Subject, fromEvent } from 'rxjs';
import { takeUntil, debounceTime, distinctUntilChanged } from 'rxjs/operators';
import { isNullOrUndefined } from '@ironsource/fusion-ui/utils';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i2 from '@ironsource/fusion-ui/components/icon/v1';
import { IconModule } from '@ironsource/fusion-ui/components/icon/v1';
import * as i3 from '@ironsource/fusion-ui/components/dynamic-components/v1';
import { DynamicComponentsModule } from '@ironsource/fusion-ui/components/dynamic-components/v1';
import * as i4 from '@ironsource/fusion-ui/directives/click-outside';
import { ClickOutsideModule } from '@ironsource/fusion-ui/directives/click-outside';
import * as i3$1 from '@ironsource/fusion-ui/components/sidebar/v2';
import { SidebarModule } from '@ironsource/fusion-ui/components/sidebar/v2';
import { SVG_OPTIONS_TOKEN } from '@ironsource/fusion-ui/components/svg';

/*
 * Created on 2020.11.16 By Andy Kononenko (andyk@ironsrc.com)
 */
var PageHeaderPosition;
(function (PageHeaderPosition) {
    PageHeaderPosition[PageHeaderPosition["OnTopPageContent"] = 0] = "OnTopPageContent";
    PageHeaderPosition[PageHeaderPosition["OnLayoutHeader"] = 1] = "OnLayoutHeader";
})(PageHeaderPosition || (PageHeaderPosition = {}));

var LayoutMediaType;
(function (LayoutMediaType) {
    LayoutMediaType[LayoutMediaType["Desktop"] = 0] = "Desktop";
    LayoutMediaType[LayoutMediaType["Tablet"] = 1] = "Tablet";
    LayoutMediaType[LayoutMediaType["Mobile"] = 2] = "Mobile";
})(LayoutMediaType || (LayoutMediaType = {}));

const LAYOUT_OPTIONS_DEFAULT_VALUE = {
    svgOptions: { assetsPath: '' }
};
const SCROLL_OFFSET_FOR_PAGE_TITLE = 10;

/*
 * Created on 2020.11.25 By Andy Kononenko (andyk@ironsrc.com)
 */
const USER_ICON_NAME = { iconName: 'user-circle', iconVersion: 'v2' };
const SIDEBAR_TOGGLE_ICON = {
    regular: { iconName: 'menu-hamburger', iconVersion: 'v2' },
    closed: { iconName: 'menu-hamburger-collapsed', iconVersion: 'v2' }
};

function LayoutHeaderMenuComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 7)(1, "div", 8);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 9);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵclassProp("fu-layout-header-menu-delimiter", !!ctx_r0.menuItems);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r0.userData == null ? null : ctx_r0.userData.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r0.userData == null ? null : ctx_r0.userData.email);
} }
function LayoutHeaderMenuComponent_div_2_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
const _c0$2 = a0 => ({ item: a0 });
function LayoutHeaderMenuComponent_div_2_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, LayoutHeaderMenuComponent_div_2_ng_container_1_ng_container_1_Template, 1, 0, "ng-container", 12);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const item_r11 = ctx.$implicit;
    i0.ɵɵnextContext(2);
    const _r9 = i0.ɵɵreference(10);
    const _r5 = i0.ɵɵreference(6);
    const _r3 = i0.ɵɵreference(4);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngTemplateOutlet", item_r11.content ? _r9 : item_r11.routeConfigurations ? _r5 : _r3)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0$2, item_r11));
} }
function LayoutHeaderMenuComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵtemplate(1, LayoutHeaderMenuComponent_div_2_ng_container_1_Template, 2, 4, "ng-container", 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngForOf", ctx_r1.menuItems);
} }
function LayoutHeaderMenuComponent_ng_template_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function LayoutHeaderMenuComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    const _r16 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵlistener("click", function LayoutHeaderMenuComponent_ng_template_3_Template_div_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r16); const item_r13 = restoredCtx.item; const ctx_r15 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r15.onMenuItemClicked(item_r13)); });
    i0.ɵɵtemplate(1, LayoutHeaderMenuComponent_ng_template_3_ng_container_1_Template, 1, 0, "ng-container", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r13 = ctx.item;
    i0.ɵɵnextContext();
    const _r7 = i0.ɵɵreference(8);
    i0.ɵɵclassMapInterpolate1("fu-layout-header-menu-item ", item_r13 == null ? null : item_r13.class, "");
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngTemplateOutlet", _r7)("ngTemplateOutletContext", i0.ɵɵpureFunction1(5, _c0$2, item_r13));
} }
function LayoutHeaderMenuComponent_ng_template_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function LayoutHeaderMenuComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "a", 14);
    i0.ɵɵtemplate(1, LayoutHeaderMenuComponent_ng_template_5_ng_container_1_Template, 1, 0, "ng-container", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r17 = ctx.item;
    i0.ɵɵnextContext();
    const _r7 = i0.ɵɵreference(8);
    i0.ɵɵclassMapInterpolate1("fu-layout-header-menu-item ", item_r17 == null ? null : item_r17.class, "");
    i0.ɵɵpropertyInterpolate("href", item_r17.routeConfigurations == null ? null : item_r17.routeConfigurations.href, i0.ɵɵsanitizeUrl);
    i0.ɵɵpropertyInterpolate("target", (item_r17.routeConfigurations == null ? null : item_r17.routeConfigurations.target) || "_self");
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngTemplateOutlet", _r7)("ngTemplateOutletContext", i0.ɵɵpureFunction1(7, _c0$2, item_r17));
} }
function LayoutHeaderMenuComponent_ng_template_7_fusion_icon_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 17);
} if (rf & 2) {
    const item_r19 = i0.ɵɵnextContext().item;
    i0.ɵɵproperty("name", item_r19 == null ? null : item_r19.icon);
} }
function LayoutHeaderMenuComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, LayoutHeaderMenuComponent_ng_template_7_fusion_icon_0_Template, 1, 1, "fusion-icon", 15);
    i0.ɵɵelementStart(1, "span", 16);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r19 = ctx.item;
    i0.ɵɵproperty("ngIf", item_r19 == null ? null : item_r19.icon);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(item_r19.name);
} }
function LayoutHeaderMenuComponent_ng_template_9_Template(rf, ctx) { if (rf & 1) {
    const _r24 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-dynamic-components", 18);
    i0.ɵɵlistener("click", function LayoutHeaderMenuComponent_ng_template_9_Template_fusion_dynamic_components_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r24); const item_r22 = restoredCtx.item; const ctx_r23 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r23.onMenuItemClicked(item_r22)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r22 = ctx.item;
    i0.ɵɵclassMapInterpolate1("fu-layout-header-menu-item-content ", item_r22 == null ? null : item_r22.class, "");
    i0.ɵɵproperty("configuration", item_r22.content);
} }
class LayoutHeaderMenuComponent {
    constructor() {
        this.layoutHeaderMenuItemClicked = new EventEmitter();
        this.isUserMenu = true;
    }
    set configuration(value) {
        this.userData = value.user;
        this.menuItems = value.menuItems;
        this.isUserMenu = !!value?.user?.name || !!value?.user?.email;
    }
    onMenuItemClicked(menuItem) {
        this.layoutHeaderMenuItemClicked.emit(menuItem);
    }
    static { this.ɵfac = function LayoutHeaderMenuComponent_Factory(t) { return new (t || LayoutHeaderMenuComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LayoutHeaderMenuComponent, selectors: [["fusion-layout-header-menu"]], inputs: { configuration: "configuration" }, outputs: { layoutHeaderMenuItemClicked: "layoutHeaderMenuItemClicked" }, decls: 11, vars: 2, consts: [[1, "fu-layout-header-menu-holder"], ["class", "fu-layout-header-menu-user", 3, "fu-layout-header-menu-delimiter", 4, "ngIf"], ["class", "fu-layout-header-menu-items", 4, "ngIf"], ["menuItemRegular", ""], ["menuItemLink", ""], ["menuItem", ""], ["menuItemCustom", ""], [1, "fu-layout-header-menu-user"], [1, "fu-layout-header-menu-user-name"], [1, "fu-layout-header-menu-user-email"], [1, "fu-layout-header-menu-items"], [4, "ngFor", "ngForOf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "click"], [3, "href", "target"], ["class", "fu-layout-header-menu-item-icon", 3, "name", 4, "ngIf"], [1, "fu-layout-header-menu-item-text"], [1, "fu-layout-header-menu-item-icon", 3, "name"], [3, "configuration", "click"]], template: function LayoutHeaderMenuComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵtemplate(1, LayoutHeaderMenuComponent_div_1_Template, 5, 4, "div", 1)(2, LayoutHeaderMenuComponent_div_2_Template, 2, 1, "div", 2);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(3, LayoutHeaderMenuComponent_ng_template_3_Template, 2, 7, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor)(5, LayoutHeaderMenuComponent_ng_template_5_Template, 2, 9, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor)(7, LayoutHeaderMenuComponent_ng_template_7_Template, 3, 2, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor)(9, LayoutHeaderMenuComponent_ng_template_9_Template, 1, 4, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.isUserMenu);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.menuItems);
        } }, dependencies: [i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, i2.IconComponent, i3.DynamicComponentsComponent], styles: ["[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-user[_ngcontent-%COMP%]   .fu-layout-header-menu-user-name[_ngcontent-%COMP%]{font-size:13px;font-family:NHaasGroteskDSPro-75Bd,sans-serif;font-weight:400}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-item[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-user[_ngcontent-%COMP%]   .fu-layout-header-menu-user-email[_ngcontent-%COMP%]{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-user[_ngcontent-%COMP%]   .fu-layout-header-menu-user-email[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-user[_ngcontent-%COMP%]   .fu-layout-header-menu-user-name[_ngcontent-%COMP%]{width:100%;display:inline-block;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}[_nghost-%COMP%]{display:none;position:absolute;z-index:1010;width:var(--layout-header-menu-width, 324px);top:6px;right:8px;border-radius:8px;background-color:var(--fu-white, #ffffff);box-shadow:0 4px 24px #00000026;padding:4px}.fu-layout-header-menu[_nghost-%COMP%]{display:initial}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-user[_ngcontent-%COMP%]{color:var(--layout-header-menu-user-name-color, var(--fu-light-900, #7b838c));padding:11px 21px 4px}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-user[_ngcontent-%COMP%]   .fu-layout-header-menu-user-name[_ngcontent-%COMP%]{line-height:1}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-user[_ngcontent-%COMP%]   .fu-layout-header-menu-user-email[_ngcontent-%COMP%]{line-height:1}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-user.fu-layout-header-menu-delimiter[_ngcontent-%COMP%]:after{content:\"\";display:block;height:8px;border-bottom:var(--header-border-bottom, solid 1px var(--fu-light-300, #e5e7e9));margin:0 -24px}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-item[_ngcontent-%COMP%]{height:var(--layout-header-menu-item-height, 40px);border-radius:var(--layout-header-menu-item-border-radius, 4px);padding:var(--layout-header-menu-item-border-padding, 0 20px);display:flex;align-items:center;color:var(--layout-header-menu-item-color, var(--fu-dark-300, #313d91));text-decoration:none}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-item[_ngcontent-%COMP%]   fusion-icon.fu-layout-header-menu-item-icon[_ngcontent-%COMP%]{margin-right:1em;padding-top:.4em}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-item[_ngcontent-%COMP%]   fusion-icon.fu-layout-header-menu-item-icon[_ngcontent-%COMP%]     svg{width:var(--layout-header-menu-item-icon-size, 15px);height:var(--layout-header-menu-item-icon-size, 15px)}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-item[_ngcontent-%COMP%]   fusion-icon.fu-layout-header-menu-item-icon[_ngcontent-%COMP%]     svg *{fill:var(--layout-header-menu-item-icon-color, currentColor)}[_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-item[_ngcontent-%COMP%]:visited, [_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-item[_ngcontent-%COMP%]:active, [_nghost-%COMP%]   .fu-layout-header-menu-holder[_ngcontent-%COMP%]   .fu-layout-header-menu-item[_ngcontent-%COMP%]:hover{color:var(--layout-header-menu-item-color, var(--fu-dark-300, #313d91));background-color:var(--layout-header-menu-item-hover-color, var(--fu-light-100, #f7f8f9));cursor:pointer}", "@media (max-width: 767.98px){[_nghost-%COMP%]{display:none}}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LayoutHeaderMenuComponent, [{
        type: Component,
        args: [{ selector: 'fusion-layout-header-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"fu-layout-header-menu-holder\">\n    <!--user data part-->\n    <div *ngIf=\"isUserMenu\" class=\"fu-layout-header-menu-user\" [class.fu-layout-header-menu-delimiter]=\"!!menuItems\">\n        <div class=\"fu-layout-header-menu-user-name\">{{ userData?.name }}</div>\n        <div class=\"fu-layout-header-menu-user-email\">{{ userData?.email }}</div>\n    </div>\n    <!--user data part-->\n    <!--menu items-->\n    <div class=\"fu-layout-header-menu-items\" *ngIf=\"menuItems\">\n        <ng-container *ngFor=\"let item of menuItems\">\n            <ng-container\n                *ngTemplateOutlet=\"\n                    item.content ? menuItemCustom : item.routeConfigurations ? menuItemLink : menuItemRegular;\n                    context: {item: item}\n                \"\n            ></ng-container>\n        </ng-container>\n    </div>\n    <!--menu items-->\n</div>\n\n<ng-template #menuItemRegular let-item=\"item\">\n    <div class=\"fu-layout-header-menu-item {{ item?.class }}\" (click)=\"onMenuItemClicked(item)\">\n        <ng-container *ngTemplateOutlet=\"menuItem; context: {item: item}\"></ng-container>\n    </div>\n</ng-template>\n\n<ng-template #menuItemLink let-item=\"item\">\n    <a\n        class=\"fu-layout-header-menu-item {{ item?.class }}\"\n        href=\"{{ item.routeConfigurations?.href }}\"\n        target=\"{{ item.routeConfigurations?.target || '_self' }}\"\n    >\n        <ng-container *ngTemplateOutlet=\"menuItem; context: {item: item}\"></ng-container>\n    </a>\n</ng-template>\n\n<ng-template #menuItem let-item=\"item\">\n    <fusion-icon *ngIf=\"item?.icon\" class=\"fu-layout-header-menu-item-icon\" [name]=\"item?.icon\"></fusion-icon>\n    <span class=\"fu-layout-header-menu-item-text\">{{ item.name }}</span>\n</ng-template>\n\n<ng-template #menuItemCustom let-item=\"item\">\n    <fusion-dynamic-components\n        class=\"fu-layout-header-menu-item-content {{ item?.class }}\"\n        (click)=\"onMenuItemClicked(item)\"\n        [configuration]=\"item.content\"\n    ></fusion-dynamic-components>\n</ng-template>\n", styles: [":host .fu-layout-header-menu-holder .fu-layout-header-menu-user .fu-layout-header-menu-user-name{font-size:13px;font-family:NHaasGroteskDSPro-75Bd,sans-serif;font-weight:400}:host .fu-layout-header-menu-holder .fu-layout-header-menu-item,:host .fu-layout-header-menu-holder .fu-layout-header-menu-user .fu-layout-header-menu-user-email{font-size:12px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400;letter-spacing:.04px}:host .fu-layout-header-menu-holder .fu-layout-header-menu-user .fu-layout-header-menu-user-email,:host .fu-layout-header-menu-holder .fu-layout-header-menu-user .fu-layout-header-menu-user-name{width:100%;display:inline-block;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}:host{display:none;position:absolute;z-index:1010;width:var(--layout-header-menu-width, 324px);top:6px;right:8px;border-radius:8px;background-color:var(--fu-white, #ffffff);box-shadow:0 4px 24px #00000026;padding:4px}:host.fu-layout-header-menu{display:initial}:host .fu-layout-header-menu-holder .fu-layout-header-menu-user{color:var(--layout-header-menu-user-name-color, var(--fu-light-900, #7b838c));padding:11px 21px 4px}:host .fu-layout-header-menu-holder .fu-layout-header-menu-user .fu-layout-header-menu-user-name{line-height:1}:host .fu-layout-header-menu-holder .fu-layout-header-menu-user .fu-layout-header-menu-user-email{line-height:1}:host .fu-layout-header-menu-holder .fu-layout-header-menu-user.fu-layout-header-menu-delimiter:after{content:\"\";display:block;height:8px;border-bottom:var(--header-border-bottom, solid 1px var(--fu-light-300, #e5e7e9));margin:0 -24px}:host .fu-layout-header-menu-holder .fu-layout-header-menu-item{height:var(--layout-header-menu-item-height, 40px);border-radius:var(--layout-header-menu-item-border-radius, 4px);padding:var(--layout-header-menu-item-border-padding, 0 20px);display:flex;align-items:center;color:var(--layout-header-menu-item-color, var(--fu-dark-300, #313d91));text-decoration:none}:host .fu-layout-header-menu-holder .fu-layout-header-menu-item fusion-icon.fu-layout-header-menu-item-icon{margin-right:1em;padding-top:.4em}:host .fu-layout-header-menu-holder .fu-layout-header-menu-item fusion-icon.fu-layout-header-menu-item-icon ::ng-deep svg{width:var(--layout-header-menu-item-icon-size, 15px);height:var(--layout-header-menu-item-icon-size, 15px)}:host .fu-layout-header-menu-holder .fu-layout-header-menu-item fusion-icon.fu-layout-header-menu-item-icon ::ng-deep svg *{fill:var(--layout-header-menu-item-icon-color, currentColor)}:host .fu-layout-header-menu-holder .fu-layout-header-menu-item:visited,:host .fu-layout-header-menu-holder .fu-layout-header-menu-item:active,:host .fu-layout-header-menu-holder .fu-layout-header-menu-item:hover{color:var(--layout-header-menu-item-color, var(--fu-dark-300, #313d91));background-color:var(--layout-header-menu-item-hover-color, var(--fu-light-100, #f7f8f9));cursor:pointer}\n", "@media (max-width: 767.98px){:host{display:none}}\n"] }]
    }], null, { configuration: [{
            type: Input
        }], layoutHeaderMenuItemClicked: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LayoutHeaderMenuComponent, { className: "LayoutHeaderMenuComponent", filePath: "components/layout-header/layout-header-menu/layout-header-menu.component.ts", lineNumber: 12 }); })();

function LayoutHeaderComponent_fusion_icon_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 10);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("name", ctx_r0.sidebarIconName);
} }
function LayoutHeaderComponent_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 11);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r1.titleText);
} }
function LayoutHeaderComponent_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 12);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r2.subtitleText);
} }
function LayoutHeaderComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelement(1, "fusion-dynamic-components", 14);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("configuration", ctx_r3.titleContent);
} }
function LayoutHeaderComponent_div_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵelement(1, "fusion-dynamic-components", 14);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("configuration", ctx_r4.customHeader);
} }
function LayoutHeaderComponent_div_8_div_1_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 23);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r8.userName);
} }
function LayoutHeaderComponent_div_8_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 20);
    i0.ɵɵlistener("click", function LayoutHeaderComponent_div_8_div_1_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r9.changeLayoutHeaderMenuState($event)); });
    i0.ɵɵelement(1, "fusion-icon", 21);
    i0.ɵɵtemplate(2, LayoutHeaderComponent_div_8_div_1_div_2_Template, 2, 1, "div", 22);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("name", ctx_r7.userIcon);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r7.userName);
} }
const _c0$1 = () => ({ iconName: "more", iconVersion: "v2" });
function LayoutHeaderComponent_div_8_Template(rf, ctx) { if (rf & 1) {
    const _r12 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 16);
    i0.ɵɵtemplate(1, LayoutHeaderComponent_div_8_div_1_Template, 3, 2, "div", 17);
    i0.ɵɵelementStart(2, "div", 18);
    i0.ɵɵlistener("click", function LayoutHeaderComponent_div_8_Template_div_click_2_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r11.changeLayoutHeaderMenuState($event)); });
    i0.ɵɵelement(3, "fusion-icon", 19);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r5.userName);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("name", i0.ɵɵpureFunction0(2, _c0$1));
} }
function LayoutHeaderComponent_fusion_layout_header_menu_9_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-layout-header-menu", 24);
    i0.ɵɵlistener("fusionClickOutside", function LayoutHeaderComponent_fusion_layout_header_menu_9_Template_fusion_layout_header_menu_fusionClickOutside_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r13.onOutsideLayoutHeaderMenuClick()); })("layoutHeaderMenuItemClicked", function LayoutHeaderComponent_fusion_layout_header_menu_9_Template_fusion_layout_header_menu_layoutHeaderMenuItemClicked_0_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r15 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r15.onLayoutHeaderMenuItemClicked($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext();
    i0.ɵɵclassProp("fu-layout-header-menu", ctx_r6.menuOpen);
    i0.ɵɵproperty("configuration", ctx_r6.headerMenuConfiguration);
} }
class LayoutHeaderComponent {
    constructor() {
        this.sidebarToggleIconClicked = new EventEmitter();
        this.layoutHeaderMenuItemClicked = new EventEmitter();
        this.sidebarIconName = SIDEBAR_TOGGLE_ICON.regular;
        this.hasMenu = false;
        this.menuOpen = false;
    }
    set configuration(value) {
        this.setPageHeader(value);
        this.customHeader = this.getCustomConfiguration(value);
        this.serHeaderRightPanel(value);
    }
    set sidebarOpen(value) {
        this.sidebarOpenOpen = value;
        this.sidebarIconName = this.setSidebarIconName(value);
    }
    /**
     * Toggle open / close header menu
     * - $event: HTMLEvent (if it occur by click or called from component method )
     */
    changeLayoutHeaderMenuState($event) {
        if ($event) {
            // for onOutsideLayoutHeaderMenuClick suppress
            $event.stopPropagation();
        }
        this.menuOpen = !this.menuOpen;
    }
    /**
     * On outside header menu click, if it was open - close it
     */
    onOutsideLayoutHeaderMenuClick() {
        if (this.menuOpen) {
            this.changeLayoutHeaderMenuState();
        }
    }
    /**
     * Emitted from header menu. Occur by menu item in header menu clicked
     * -param menuItem
     */
    onLayoutHeaderMenuItemClicked(menuItem) {
        this.layoutHeaderMenuItemClicked.emit(menuItem);
        // close menu
        this.onOutsideLayoutHeaderMenuClick();
    }
    setPageHeader(value) {
        this.titleText = value?.title?.text;
        this.subtitleText = value?.title?.subtitle;
        // relevant only for type - page
        this.titleContent = value?.title?.type === 'page' ? value?.title?.content : null;
    }
    serHeaderRightPanel(value) {
        this.userName = value?.user?.name;
        this.userIcon = value?.user?.icon ?? USER_ICON_NAME;
        this.hasMenu = !!value?.user?.name || !!value?.user?.name || !!value?.menuItems;
        this.headerMenuConfiguration = {
            user: value?.user,
            menuItems: value?.menuItems
        };
    }
    /**
     * Get sidebar toggle icon name by sidebar state from configuration
     * - isOpen: Sidebar state Open
     * *private
     */
    setSidebarIconName(isOpen) {
        return isOpen ? SIDEBAR_TOGGLE_ICON.regular : SIDEBAR_TOGGLE_ICON.closed;
    }
    /**
     * Check and return custom header component / element / html snippet
     * - config
     * *private
     */
    getCustomConfiguration(config) {
        return config?.content?.component || config?.content?.element || config?.content?.htmlSnippet ? config.content : undefined;
    }
    static { this.ɵfac = function LayoutHeaderComponent_Factory(t) { return new (t || LayoutHeaderComponent)(); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LayoutHeaderComponent, selectors: [["fusion-layout-header"]], inputs: { configuration: "configuration", sidebarOpen: "sidebarOpen", showPageHeaderContent: "showPageHeaderContent" }, outputs: { sidebarToggleIconClicked: "sidebarToggleIconClicked", layoutHeaderMenuItemClicked: "layoutHeaderMenuItemClicked" }, decls: 10, vars: 7, consts: [[1, "fu-header"], [1, "fu-header-sidebar-state-icon", 3, "click"], ["class", "fu-sidebar-state-toggle-icon", 3, "name", 4, "ngIf"], [1, "fu-header-title"], ["class", "fu-header-title-text", 4, "ngIf"], ["class", "fu-header-subtitle-text", 4, "ngIf"], ["class", "fu-header-title-content", 4, "ngIf"], ["class", "fu-header-custom-element-holder", 4, "ngIf"], ["class", "fu-header-right-panel", 4, "ngIf"], [3, "fu-layout-header-menu", "configuration", "fusionClickOutside", "layoutHeaderMenuItemClicked", 4, "ngIf"], [1, "fu-sidebar-state-toggle-icon", 3, "name"], [1, "fu-header-title-text"], [1, "fu-header-subtitle-text"], [1, "fu-header-title-content"], [3, "configuration"], [1, "fu-header-custom-element-holder"], [1, "fu-header-right-panel"], ["class", "fu-header-user-holder", 3, "click", 4, "ngIf"], [1, "fu-header-icon-more-holder", 3, "click"], [1, "fu-header-icon-more", 3, "name"], [1, "fu-header-user-holder", 3, "click"], [1, "fu-header-icon-user", 3, "name"], ["class", "fu-header-username", 4, "ngIf"], [1, "fu-header-username"], [3, "configuration", "fusionClickOutside", "layoutHeaderMenuItemClicked"]], template: function LayoutHeaderComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
            i0.ɵɵlistener("click", function LayoutHeaderComponent_Template_div_click_1_listener() { return ctx.sidebarToggleIconClicked.emit(); });
            i0.ɵɵtemplate(2, LayoutHeaderComponent_fusion_icon_2_Template, 1, 1, "fusion-icon", 2);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(3, "div", 3);
            i0.ɵɵtemplate(4, LayoutHeaderComponent_div_4_Template, 2, 1, "div", 4)(5, LayoutHeaderComponent_div_5_Template, 2, 1, "div", 5)(6, LayoutHeaderComponent_div_6_Template, 2, 1, "div", 6);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(7, LayoutHeaderComponent_div_7_Template, 2, 1, "div", 7)(8, LayoutHeaderComponent_div_8_Template, 4, 3, "div", 8);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(9, LayoutHeaderComponent_fusion_layout_header_menu_9_Template, 1, 3, "fusion-layout-header-menu", 9);
        } if (rf & 2) {
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.sidebarIconName);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.titleText);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.subtitleText);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.titleContent && ctx.showPageHeaderContent);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.customHeader);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.hasMenu);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.hasMenu);
        } }, dependencies: [i1.NgIf, i2.IconComponent, i3.DynamicComponentsComponent, i4.ClickOutsideDirective, LayoutHeaderMenuComponent], styles: ["@charset \"UTF-8\";[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]   .fu-header-title-text[_ngcontent-%COMP%]{font-size:18px;font-family:NHaasGroteskDSPro-75Bd,sans-serif;font-weight:400}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-user-holder[_ngcontent-%COMP%]   .fu-header-username[_ngcontent-%COMP%]{font-size:11px;font-family:NHaasGroteskDSPro-65Md,sans-serif;font-weight:400;letter-spacing:.25px}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-user-holder[_ngcontent-%COMP%]   .fu-header-username[_ngcontent-%COMP%]{width:100%;display:inline-block;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-user-holder[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]{display:flex;align-items:center}[_nghost-%COMP%]{position:relative;display:block;padding-left:var(--layout-header-padding-left, 1.5em);padding-right:var(--layout-header-padding-right, 1em);border-bottom:var(--layout-header-border-bottom, solid 1px var(--fu-light-300, #e5e7e9))}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]{height:var(--layout-header-height, 64px)}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-sidebar-state-icon[_ngcontent-%COMP%]{width:var(--layout-header-sidebar-icon-size, 16px);height:var(--layout-header-sidebar-icon-size, 16px);margin-right:var(--layout-header-sidebar-icon-margin-right, 1em);cursor:pointer}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-sidebar-state-icon[_ngcontent-%COMP%]   fusion-icon[_ngcontent-%COMP%]     svg{width:var(--layout-header-sidebar-icon-size, 16px);height:var(--layout-header-sidebar-icon-size, 16px)}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-sidebar-state-icon[_ngcontent-%COMP%]   fusion-icon[_ngcontent-%COMP%]     svg *{fill:var(--layout-header-sidebar-icon-color, var(--fu-light-700, #a9afb4))}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;margin-right:var(--layout-header-title-margin-right, 1em);opacity:0;transition:opacity .3s ease-out}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]   .fu-header-title-text[_ngcontent-%COMP%]{color:var(--layout-header-title-color, var(--fu-dark-300, #313d91));margin-right:var(--layout-header-title-margin-right, 1em);white-space:nowrap}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]   .fu-header-subtitle-text[_ngcontent-%COMP%]{position:relative;font-size:.813rem;color:var(--layout-header-title-color, var(--fu-dark-300, #313d91));margin-left:-3px}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]   .fu-header-subtitle-text[_ngcontent-%COMP%]:before{position:absolute;color:var(--layout-header-title-color, var(--fu-dark-300, #313d91));left:-9px;content:\"\\2022\";font-size:.68rem}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]   .fu-header-title-content[_ngcontent-%COMP%]{flex-grow:1}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-custom-element-holder[_ngcontent-%COMP%]{display:block;flex-grow:1}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]{height:100%;margin-left:auto;border-left:var(--layout-header-right-panel-border-right, solid 1px var(--fu-light-300, #e5e7e9));padding-left:1em}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-user-holder[_ngcontent-%COMP%]{line-height:1.5;margin-right:.5em;color:var(--layout-header-user-name-color, var(--fu-light-900, #7b838c));cursor:pointer}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-user-holder[_ngcontent-%COMP%]   fusion-icon.fu-header-icon-user[_ngcontent-%COMP%]     svg{width:var(--layout-header-user-icon-size, 18px);height:var(--layout-header-user-icon-size, 18px)}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-user-holder[_ngcontent-%COMP%]   fusion-icon.fu-header-icon-user[_ngcontent-%COMP%]     svg *{fill:var(--layout-header-user-icon-color, currentColor)}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-user-holder[_ngcontent-%COMP%]   .fu-header-username[_ngcontent-%COMP%]{margin-left:1em;width:var(--layout-header-user-name-width, 130px)}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-icon-more-holder[_ngcontent-%COMP%]{position:relative;margin-left:auto;width:var(--layout-header-menu-opener-size, 32px);height:var(--layout-header-menu-opener-size, 32px);border-radius:calc(var(--layout-header-menu-opener-size, 32px) / 2);cursor:pointer}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-icon-more-holder[_ngcontent-%COMP%]   fusion-icon.fu-header-icon-more[_ngcontent-%COMP%]{position:absolute;top:calc(50% - var(--layout-header-icon-more-size, 16px) / 2);left:calc(50% - var(--layout-header-icon-more-size, 16px) / 2)}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-icon-more-holder[_ngcontent-%COMP%]   fusion-icon.fu-header-icon-more[_ngcontent-%COMP%]     svg{width:var(--layout-header-icon-more-size, 16px);height:var(--layout-header-icon-more-size, 16px)}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-icon-more-holder[_ngcontent-%COMP%]   fusion-icon.fu-header-icon-more[_ngcontent-%COMP%]     svg *{fill:var(--layout-header-icon-more-color, var(--fu-light-700, #a9afb4))}[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]   .fu-header-icon-more-holder[_ngcontent-%COMP%]:hover{background-color:var(--layout-header-menu-opener-background-color-hover, var(--fu-light-300, #e5e7e9))}@media (max-width: 767.98px){[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]{display:none}}.fu-layout-page-header-behaviour-type_none[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%], .fu-layout-page-header-behaviour-type_none   [_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]{display:none}.fu-layout-page-header-behaviour-type_static[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%], .fu-layout-page-header-behaviour-type_static   [_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]{opacity:1}.fu-layout-page-header-behaviour-type_page[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%], .fu-layout-page-header-behaviour-type_page   [_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]{opacity:0}.fu-layout-page-header-behaviour-type_page.fu-layout-page-header-header[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%], .fu-layout-page-header-behaviour-type_page.fu-layout-page-header-header   [_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]{opacity:1}.fu-layout-page-header-behaviour-type_fixed[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%], .fu-layout-page-header-behaviour-type_fixed   [_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]{opacity:0}.fu-layout-page-header-behaviour-type_fixed[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]   .fu-header-title-content[_ngcontent-%COMP%], .fu-layout-page-header-behaviour-type_fixed   [_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]   .fu-header-title-content[_ngcontent-%COMP%]{display:none}.fu-layout-page-header-behaviour-type_fixed.fu-layout-page-header-header[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%], .fu-layout-page-header-behaviour-type_fixed.fu-layout-page-header-header   [_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-title[_ngcontent-%COMP%]{opacity:1}", "@media (max-width: 767.98px){[_nghost-%COMP%]   .fu-header[_ngcontent-%COMP%]   .fu-header-right-panel[_ngcontent-%COMP%]{display:none}}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LayoutHeaderComponent, [{
        type: Component,
        args: [{ selector: 'fusion-layout-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"fu-header\">\n    <!--sidebar toggle icon-->\n    <div class=\"fu-header-sidebar-state-icon\" (click)=\"sidebarToggleIconClicked.emit()\">\n        <fusion-icon class=\"fu-sidebar-state-toggle-icon\" *ngIf=\"sidebarIconName\" [name]=\"sidebarIconName\"></fusion-icon>\n    </div>\n    <!--sidebar toggle icon-->\n    <!--header title-->\n    <div class=\"fu-header-title\">\n        <div *ngIf=\"titleText\" class=\"fu-header-title-text\">{{ titleText }}</div>\n        <div *ngIf=\"subtitleText\" class=\"fu-header-subtitle-text\">{{ subtitleText }}</div>\n        <div *ngIf=\"titleContent && showPageHeaderContent\" class=\"fu-header-title-content\">\n            <fusion-dynamic-components [configuration]=\"titleContent\"></fusion-dynamic-components>\n        </div>\n    </div>\n\n    <!--header title-->\n    <div *ngIf=\"customHeader\" class=\"fu-header-custom-element-holder\">\n        <fusion-dynamic-components [configuration]=\"customHeader\"></fusion-dynamic-components>\n    </div>\n    <!--header custom part-->\n    <!--header right panel-->\n    <div *ngIf=\"hasMenu\" class=\"fu-header-right-panel\">\n        <div *ngIf=\"userName\" class=\"fu-header-user-holder\" (click)=\"changeLayoutHeaderMenuState($event)\">\n            <fusion-icon class=\"fu-header-icon-user\" [name]=\"userIcon\"></fusion-icon>\n            <div *ngIf=\"userName\" class=\"fu-header-username\">{{ userName }}</div>\n        </div>\n        <div class=\"fu-header-icon-more-holder\" (click)=\"changeLayoutHeaderMenuState($event)\">\n            <fusion-icon class=\"fu-header-icon-more\" [name]=\"{iconName: 'more', iconVersion: 'v2'}\"></fusion-icon>\n        </div>\n    </div>\n    <!--header right panel-->\n</div>\n\n<!--Header menu -->\n<fusion-layout-header-menu\n    *ngIf=\"hasMenu\"\n    [class.fu-layout-header-menu]=\"menuOpen\"\n    [configuration]=\"headerMenuConfiguration\"\n    (fusionClickOutside)=\"onOutsideLayoutHeaderMenuClick()\"\n    (layoutHeaderMenuItemClicked)=\"onLayoutHeaderMenuItemClicked($event)\"\n></fusion-layout-header-menu>\n<!--Header menu -->\n", styles: ["@charset \"UTF-8\";:host .fu-header .fu-header-title .fu-header-title-text{font-size:18px;font-family:NHaasGroteskDSPro-75Bd,sans-serif;font-weight:400}:host .fu-header .fu-header-right-panel .fu-header-user-holder .fu-header-username{font-size:11px;font-family:NHaasGroteskDSPro-65Md,sans-serif;font-weight:400;letter-spacing:.25px}:host .fu-header .fu-header-right-panel .fu-header-user-holder .fu-header-username{width:100%;display:inline-block;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}:host .fu-header .fu-header-right-panel .fu-header-user-holder,:host .fu-header .fu-header-right-panel,:host .fu-header{display:flex;align-items:center}:host{position:relative;display:block;padding-left:var(--layout-header-padding-left, 1.5em);padding-right:var(--layout-header-padding-right, 1em);border-bottom:var(--layout-header-border-bottom, solid 1px var(--fu-light-300, #e5e7e9))}:host .fu-header{height:var(--layout-header-height, 64px)}:host .fu-header .fu-header-sidebar-state-icon{width:var(--layout-header-sidebar-icon-size, 16px);height:var(--layout-header-sidebar-icon-size, 16px);margin-right:var(--layout-header-sidebar-icon-margin-right, 1em);cursor:pointer}:host .fu-header .fu-header-sidebar-state-icon fusion-icon ::ng-deep svg{width:var(--layout-header-sidebar-icon-size, 16px);height:var(--layout-header-sidebar-icon-size, 16px)}:host .fu-header .fu-header-sidebar-state-icon fusion-icon ::ng-deep svg *{fill:var(--layout-header-sidebar-icon-color, var(--fu-light-700, #a9afb4))}:host .fu-header .fu-header-title{display:flex;align-items:center;width:100%;margin-right:var(--layout-header-title-margin-right, 1em);opacity:0;transition:opacity .3s ease-out}:host .fu-header .fu-header-title .fu-header-title-text{color:var(--layout-header-title-color, var(--fu-dark-300, #313d91));margin-right:var(--layout-header-title-margin-right, 1em);white-space:nowrap}:host .fu-header .fu-header-title .fu-header-subtitle-text{position:relative;font-size:.813rem;color:var(--layout-header-title-color, var(--fu-dark-300, #313d91));margin-left:-3px}:host .fu-header .fu-header-title .fu-header-subtitle-text:before{position:absolute;color:var(--layout-header-title-color, var(--fu-dark-300, #313d91));left:-9px;content:\"\\2022\";font-size:.68rem}:host .fu-header .fu-header-title .fu-header-title-content{flex-grow:1}:host .fu-header .fu-header-custom-element-holder{display:block;flex-grow:1}:host .fu-header .fu-header-right-panel{height:100%;margin-left:auto;border-left:var(--layout-header-right-panel-border-right, solid 1px var(--fu-light-300, #e5e7e9));padding-left:1em}:host .fu-header .fu-header-right-panel .fu-header-user-holder{line-height:1.5;margin-right:.5em;color:var(--layout-header-user-name-color, var(--fu-light-900, #7b838c));cursor:pointer}:host .fu-header .fu-header-right-panel .fu-header-user-holder fusion-icon.fu-header-icon-user ::ng-deep svg{width:var(--layout-header-user-icon-size, 18px);height:var(--layout-header-user-icon-size, 18px)}:host .fu-header .fu-header-right-panel .fu-header-user-holder fusion-icon.fu-header-icon-user ::ng-deep svg *{fill:var(--layout-header-user-icon-color, currentColor)}:host .fu-header .fu-header-right-panel .fu-header-user-holder .fu-header-username{margin-left:1em;width:var(--layout-header-user-name-width, 130px)}:host .fu-header .fu-header-right-panel .fu-header-icon-more-holder{position:relative;margin-left:auto;width:var(--layout-header-menu-opener-size, 32px);height:var(--layout-header-menu-opener-size, 32px);border-radius:calc(var(--layout-header-menu-opener-size, 32px) / 2);cursor:pointer}:host .fu-header .fu-header-right-panel .fu-header-icon-more-holder fusion-icon.fu-header-icon-more{position:absolute;top:calc(50% - var(--layout-header-icon-more-size, 16px) / 2);left:calc(50% - var(--layout-header-icon-more-size, 16px) / 2)}:host .fu-header .fu-header-right-panel .fu-header-icon-more-holder fusion-icon.fu-header-icon-more ::ng-deep svg{width:var(--layout-header-icon-more-size, 16px);height:var(--layout-header-icon-more-size, 16px)}:host .fu-header .fu-header-right-panel .fu-header-icon-more-holder fusion-icon.fu-header-icon-more ::ng-deep svg *{fill:var(--layout-header-icon-more-color, var(--fu-light-700, #a9afb4))}:host .fu-header .fu-header-right-panel .fu-header-icon-more-holder:hover{background-color:var(--layout-header-menu-opener-background-color-hover, var(--fu-light-300, #e5e7e9))}@media (max-width: 767.98px){:host .fu-header .fu-header-right-panel{display:none}}:host-context(.fu-layout-page-header-behaviour-type_none) .fu-header .fu-header-title{display:none}:host-context(.fu-layout-page-header-behaviour-type_static) .fu-header .fu-header-title{opacity:1}:host-context(.fu-layout-page-header-behaviour-type_page) .fu-header .fu-header-title{opacity:0}:host-context(.fu-layout-page-header-behaviour-type_page.fu-layout-page-header-header) .fu-header .fu-header-title{opacity:1}:host-context(.fu-layout-page-header-behaviour-type_fixed) .fu-header .fu-header-title{opacity:0}:host-context(.fu-layout-page-header-behaviour-type_fixed) .fu-header .fu-header-title .fu-header-title-content{display:none}:host-context(.fu-layout-page-header-behaviour-type_fixed.fu-layout-page-header-header) .fu-header .fu-header-title{opacity:1}\n", "@media (max-width: 767.98px){:host .fu-header .fu-header-right-panel{display:none}}\n"] }]
    }], null, { configuration: [{
            type: Input
        }], sidebarOpen: [{
            type: Input
        }], showPageHeaderContent: [{
            type: Input
        }], sidebarToggleIconClicked: [{
            type: Output
        }], layoutHeaderMenuItemClicked: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LayoutHeaderComponent, { className: "LayoutHeaderComponent", filePath: "components/layout-header/layout-header.component.ts", lineNumber: 15 }); })();

const _c0 = ["mainContent"];
const _c1 = ["mediaSize"];
function LayoutComponent_ng_container_11_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelement(1, "fusion-dynamic-components", 14);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const pageHeaderTitle_r3 = i0.ɵɵnextContext().ngIf;
    i0.ɵɵadvance();
    i0.ɵɵproperty("configuration", pageHeaderTitle_r3 == null ? null : pageHeaderTitle_r3.content);
} }
function LayoutComponent_ng_container_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 10)(2, "div", 11);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, LayoutComponent_ng_container_11_div_4_Template, 2, 1, "div", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const pageHeaderTitle_r3 = ctx.ngIf;
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(pageHeaderTitle_r3 == null ? null : pageHeaderTitle_r3.text);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.showPageHeaderContent(!!(pageHeaderTitle_r3 == null ? null : pageHeaderTitle_r3.content)));
} }
const _c2 = ["*"];
class LayoutComponent {
    set configuration(value) {
        this.sidebarConfiguration = {
            ...this.sidebarConfiguration,
            menuItems: value?.sidebarMenuItems ?? [],
            user: value?.user,
            pathNameNormalizeRegex: value?.pathNameNormalizeRegex,
            logoClickable: value?.logoClickable
        };
        this.setHeaderBehaviour(value?.headerConfiguration?.title);
        this.headerConfiguration = { ...value?.headerConfiguration, ...{ user: value?.user } };
    }
    set sidebarDynamicContent(value) {
        this.sidebarConfiguration = { ...this.sidebarConfiguration, sidebarDynamicContent: value };
    }
    get forceModeClass() {
        return this.forceScreenMode ? `fu-force-${this.forceScreenMode}` : null;
    }
    constructor(cdRef) {
        this.cdRef = cdRef;
        this.menuSidebarItemClicked = new EventEmitter();
        this.menuHeaderItemClicked = new EventEmitter();
        this.routeNavigationEnded = new EventEmitter();
        this.userLogout = new EventEmitter();
        this.logoClicked = new EventEmitter();
        this.sidebarConfiguration = {};
        this.pageHeaderTitle$ = new BehaviorSubject(null);
        this.pageHeaderBehaviourType$ = new BehaviorSubject('none');
        this.pageHeaderPositionEnum = PageHeaderPosition;
        this.pageHeaderPosition$ = new BehaviorSubject(PageHeaderPosition.OnTopPageContent);
        this.sidebarClosedHovered$ = new BehaviorSubject(false);
        this.onDestroy$ = new Subject();
    }
    ngOnInit() {
        this.initResizeListener();
        this.initScrollListener();
    }
    ngOnDestroy() {
        this.onDestroy$.next();
        this.onDestroy$.complete();
    }
    /**
     * Here will checked initial media-type (Desktop, Tablet, Mobile).
     * in case media-type not desktop will set sidebar closed (collapsed).
     */
    ngAfterViewInit() {
        // get current media-type size
        this.currentMediaSizeType = this.getMediaType();
        // for init in tablet and mobile - set sidebar close
        if (this.currentMediaSizeType !== LayoutMediaType.Desktop) {
            this.forceSidebarStateChange(false);
        }
    }
    /**
     * Emitted from header. Occur by click on 'hamburger' icon
     */
    onSidebarStateChanged() {
        this.sidebarOpen = !this.sidebarOpen;
        if (this.currentMediaSizeType !== LayoutMediaType.Desktop) {
            // for tablet and mobile set closed-hovered
            this.sidebarClosedHovered$.next(this.sidebarOpen);
        }
    }
    /**
     * Emitted from header. Occur by menu item in header menu clicked
     * - menuItem
     */
    onHeaderMenuItemClicked(menuItem) {
        this.menuHeaderItemClicked.emit(menuItem);
    }
    /**
     * Emitted from side-bar. Occur by menu item in side-bar clicked
     * - menuItem
     */
    onSidebarMenuItemClicked(menuItem) {
        this.menuSidebarItemClicked.emit(menuItem);
    }
    /**
     * Emitted from side-bar. Occur when sidebar closed (collapsed) and mouse over it.
     * - isHovered: mouse on sidebar - true
     */
    onSidebarClosedHovered(isHovered) {
        this.sidebarClosedHovered$.next(isHovered);
    }
    /**
     * Occur when user clicked on main content overlay. (relevant for mobile media-type only)
     */
    onMobileOverlayClicked() {
        this.sidebarOpen = !this.sidebarOpen;
        this.sidebarClosedHovered$.next(this.sidebarOpen);
    }
    /**
     * Emitted from side-bar. Occur when user click logout icon. (rendered in sidebar for mobile media-type only)
     * - user
     */
    onLogoutIconClicked(user) {
        this.userLogout.emit(user);
    }
    /**
     * Emitted from side-bar. Occur when user clicked on logo
     */
    onLogoClicked() {
        this.logoClicked.emit();
    }
    /**
     * Emitted from side-bar. Occur when route navigation ended (side-bar has observer for it)
     */
    onNavigationEnded() {
        this.mainContentScrollTop();
        // close sidebar (menu) for tablet and mobile
        if (this.currentMediaSizeType !== LayoutMediaType.Desktop && !this.forceScreenMode) {
            this.sidebarOpen = !this.sidebarOpen;
            this.sidebarClosedHovered$.next(this.sidebarOpen);
        }
        // emit event to consumer
        this.routeNavigationEnded.emit();
    }
    /**
     * Make scroll top for the main content
     * - offset (optional, default - 0)
     */
    mainContentScrollTop(offset = 0) {
        if (this.mainContent) {
            this.mainContent.nativeElement.scrollTop = offset;
        }
    }
    showPageHeaderContent(hasContent) {
        return (hasContent &&
            (this.pageHeaderPosition$.getValue() !== PageHeaderPosition.OnLayoutHeader ||
                this.pageHeaderBehaviourType$.getValue() === 'fixed'));
    }
    /**
     * Subscribe on window resize event for media-type size check.
     */
    initResizeListener() {
        fromEvent(window, 'resize')
            .pipe(takeUntil(this.onDestroy$), debounceTime(100), distinctUntilChanged())
            .subscribe(() => {
            const prevMediaSizeType = this.currentMediaSizeType;
            this.currentMediaSizeType = this.getMediaType();
            // on media size type changed by resize
            if (prevMediaSizeType !== this.currentMediaSizeType) {
                // in case sidebar was not collapsed and new mediasize tablet or mobile - close sidebar
                if (this.sidebarOpen && this.currentMediaSizeType !== LayoutMediaType.Desktop) {
                    this.sidebarClosedHovered$.next(true);
                }
                else if (this.sidebarOpen && this.currentMediaSizeType === LayoutMediaType.Desktop) {
                    this.sidebarClosedHovered$.next(false);
                }
            }
        });
    }
    /**
     * Scroll on main content listener used for page header behaviour
     */
    initScrollListener() {
        fromEvent(this.mainContent.nativeElement, 'scroll')
            .pipe(takeUntil(this.onDestroy$))
            .subscribe(($event) => {
            const scrollPosition = $event.target.scrollTop;
            this.pageHeaderPosition$.next(scrollPosition >= SCROLL_OFFSET_FOR_PAGE_TITLE ? PageHeaderPosition.OnLayoutHeader : PageHeaderPosition.OnTopPageContent);
        });
    }
    setHeaderBehaviour(value) {
        if (!!value && value.text && value.type && value.type !== 'static') {
            this.pageHeaderTitle$.next({
                text: value?.text,
                content: value?.content,
                type: value?.type
            });
            this.pageHeaderBehaviourType$.next(value?.type);
        }
        else {
            this.pageHeaderTitle$.next(null);
            this.pageHeaderBehaviourType$.next(value?.text ? 'static' : 'none');
        }
    }
    /**
     * For detection media size (supported: desktop, tablet, mobile)
     * used hidden DOM element for it
     */
    getMediaType() {
        // FU-89: force screen mode used for "emulation" screen size
        if (!isNullOrUndefined(this.forceScreenMode)) {
            return this.getForcedMediaType();
        }
        const content = window.getComputedStyle(this.mediaSizeDetector.nativeElement).content;
        // check if found media size detector content
        if (content) {
            // get enum value or return default (Desktop)
            return LayoutMediaType[content.replace(/\"/g, '')] ?? LayoutMediaType.Desktop;
        }
        return LayoutMediaType.Desktop;
    }
    getForcedMediaType() {
        switch (this.forceScreenMode) {
            case 'desktop':
                return LayoutMediaType.Desktop;
            case 'tablet':
                return LayoutMediaType.Tablet;
            case 'mobile':
                return LayoutMediaType.Mobile;
        }
        return null;
    }
    /**
     * For media-size tablet and mobile
     * - isClosed
     */
    forceSidebarStateChange(isClosed) {
        this.sidebarOpen = isClosed;
        this.cdRef.detectChanges();
    }
    static { this.ɵfac = function LayoutComponent_Factory(t) { return new (t || LayoutComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LayoutComponent, selectors: [["fusion-layout"]], viewQuery: function LayoutComponent_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.mainContent = _t.first);
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.mediaSizeDetector = _t.first);
        } }, hostVars: 2, hostBindings: function LayoutComponent_HostBindings(rf, ctx) { if (rf & 2) {
            i0.ɵɵclassMap(ctx.forceModeClass);
        } }, inputs: { configuration: "configuration", sidebarDynamicContent: "sidebarDynamicContent", forceScreenMode: "forceScreenMode" }, outputs: { menuSidebarItemClicked: "menuSidebarItemClicked", menuHeaderItemClicked: "menuHeaderItemClicked", routeNavigationEnded: "routeNavigationEnded", userLogout: "userLogout", logoClicked: "logoClicked" }, ngContentSelectors: _c2, decls: 18, vars: 30, consts: [[1, "fu-sidebar-holder"], [3, "configuration", "saveSidebarState", "sidebarOpen", "sidebarOpenChange", "logoClicked", "sidebarClosedHovered", "sidebarMenuItemClicked", "navigationEnded", "logoutIconClicked"], [1, "fu-header-holder"], [3, "configuration", "sidebarOpen", "showPageHeaderContent", "sidebarToggleIconClicked", "layoutHeaderMenuItemClicked"], ["id", "fu-layout-main-view", 1, "fu-content-holder"], ["mainContent", ""], [4, "ngIf"], [1, "fu-layout-mobile-overlay", 3, "click"], [1, "fu-screen-size-detection"], ["mediaSize", ""], [1, "fu-layout-page-header"], [1, "fu-layout-page-header-title"], ["class", "fu-layout-page-header-content", 4, "ngIf"], [1, "fu-layout-page-header-content"], [3, "configuration"]], template: function LayoutComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵprojectionDef();
            i0.ɵɵelementStart(0, "div");
            i0.ɵɵpipe(1, "async");
            i0.ɵɵpipe(2, "async");
            i0.ɵɵelementStart(3, "div", 0)(4, "fusion-sidebar", 1);
            i0.ɵɵtwoWayListener("sidebarOpenChange", function LayoutComponent_Template_fusion_sidebar_sidebarOpenChange_4_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.sidebarOpen, $event) || (ctx.sidebarOpen = $event); return $event; });
            i0.ɵɵlistener("logoClicked", function LayoutComponent_Template_fusion_sidebar_logoClicked_4_listener() { return ctx.onLogoClicked(); })("sidebarClosedHovered", function LayoutComponent_Template_fusion_sidebar_sidebarClosedHovered_4_listener($event) { return ctx.onSidebarClosedHovered($event); })("sidebarMenuItemClicked", function LayoutComponent_Template_fusion_sidebar_sidebarMenuItemClicked_4_listener($event) { return ctx.onSidebarMenuItemClicked($event); })("navigationEnded", function LayoutComponent_Template_fusion_sidebar_navigationEnded_4_listener() { return ctx.onNavigationEnded(); })("logoutIconClicked", function LayoutComponent_Template_fusion_sidebar_logoutIconClicked_4_listener($event) { return ctx.onLogoutIconClicked($event); });
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(5, "div", 2);
            i0.ɵɵpipe(6, "async");
            i0.ɵɵelementStart(7, "fusion-layout-header", 3);
            i0.ɵɵlistener("sidebarToggleIconClicked", function LayoutComponent_Template_fusion_layout_header_sidebarToggleIconClicked_7_listener() { return ctx.onSidebarStateChanged(); })("layoutHeaderMenuItemClicked", function LayoutComponent_Template_fusion_layout_header_layoutHeaderMenuItemClicked_7_listener($event) { return ctx.onHeaderMenuItemClicked($event); });
            i0.ɵɵpipe(8, "async");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(9, "div", 4, 5);
            i0.ɵɵtemplate(11, LayoutComponent_ng_container_11_Template, 5, 2, "ng-container", 6);
            i0.ɵɵpipe(12, "async");
            i0.ɵɵprojection(13);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(14, "div", 7);
            i0.ɵɵlistener("click", function LayoutComponent_Template_div_click_14_listener() { return ctx.onMobileOverlayClicked(); });
            i0.ɵɵpipe(15, "async");
            i0.ɵɵelementEnd();
            i0.ɵɵelement(16, "div", 8, 9);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵclassMapInterpolate1("fu-layout fu-layout-page-header-behaviour-type_", i0.ɵɵpipeBind1(1, 18, ctx.pageHeaderBehaviourType$), "");
            i0.ɵɵclassProp("fu-layout-page-header-header", i0.ɵɵpipeBind1(2, 20, ctx.pageHeaderPosition$) === ctx.pageHeaderPositionEnum.OnLayoutHeader);
            i0.ɵɵadvance(4);
            i0.ɵɵproperty("configuration", ctx.sidebarConfiguration)("saveSidebarState", !ctx.forceScreenMode);
            i0.ɵɵtwoWayProperty("sidebarOpen", ctx.sidebarOpen);
            i0.ɵɵadvance();
            i0.ɵɵclassProp("fu-layout-sidebar-closed", !ctx.sidebarOpen)("fu-sidebar-closed-hovered", i0.ɵɵpipeBind1(6, 22, ctx.sidebarClosedHovered$));
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("configuration", ctx.headerConfiguration)("sidebarOpen", ctx.sidebarOpen)("showPageHeaderContent", i0.ɵɵpipeBind1(8, 24, ctx.pageHeaderPosition$) === ctx.pageHeaderPositionEnum.OnLayoutHeader);
            i0.ɵɵadvance(4);
            i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(12, 26, ctx.pageHeaderTitle$));
            i0.ɵɵadvance(3);
            i0.ɵɵclassProp("fu-sidebar-closed-hovered", i0.ɵɵpipeBind1(15, 28, ctx.sidebarClosedHovered$));
        } }, dependencies: [i1.NgIf, LayoutHeaderComponent, i3$1.SidebarComponent, i3.DynamicComponentsComponent, i1.AsyncPipe], styles: ["\n\n\n[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-content-holder[_ngcontent-%COMP%]   .fu-layout-page-header[_ngcontent-%COMP%]   .fu-layout-page-header-title[_ngcontent-%COMP%]{font-size:60px;font-family:NHaasGroteskDSPro-75Bd,sans-serif}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]{margin:0;padding:0;vertical-align:initial;text-align:initial}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]{display:grid;grid-template-columns:min-content 1fr;grid-template-rows:var(--layout-header-height, 64px) auto;width:100vw;height:100vh}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-sidebar-holder[_ngcontent-%COMP%]{grid-row:span 2}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-header-holder[_ngcontent-%COMP%]{height:var(--layout-header-height, 64px);transition:padding-left .3s ease-out}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-header-holder.fu-sidebar-closed-hovered[_ngcontent-%COMP%]{padding-left:calc(var(--layout-sidebar-width, 220px) - var(--layout-sidebar-closed-width, 72px))}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-content-holder[_ngcontent-%COMP%]{height:calc(100vh - var(--layout-header-height, 64px) - 1px);margin-top:1px;overflow-y:auto}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-content-holder[_ngcontent-%COMP%]   .fu-layout-page-header[_ngcontent-%COMP%]{height:var(--layout-page-header-height, 72px);margin:var(--layout-page-header-margin, 0 30px);display:flex;align-items:center;transition:opacity .3s ease-out}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-content-holder[_ngcontent-%COMP%]   .fu-layout-page-header[_ngcontent-%COMP%]   .fu-layout-page-header-title[_ngcontent-%COMP%]{color:var(--layout-page-header-title-color, var(--fu-dark-500, #0d148c));line-height:1;white-space:nowrap}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-content-holder[_ngcontent-%COMP%]   .fu-layout-page-header[_ngcontent-%COMP%]   .fu-layout-page-header-content[_ngcontent-%COMP%]{flex-grow:1}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-layout-mobile-overlay[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-screen-size-detection[_ngcontent-%COMP%]{content:\"Desktop\"}[_nghost-%COMP%]   .fu-layout.fu-layout-page-header-behaviour-type_fixed[_ngcontent-%COMP%]   .fu-content-holder[_ngcontent-%COMP%]   .fu-layout-page-header[_ngcontent-%COMP%]   .fu-layout-page-header-content[_ngcontent-%COMP%]{position:fixed;z-index:1010;right:40px}[_nghost-%COMP%]   .fu-layout.fu-layout-page-header-header[_ngcontent-%COMP%]   .fu-content-holder[_ngcontent-%COMP%]   .fu-layout-page-header[_ngcontent-%COMP%]{opacity:0}[_nghost-%COMP%]   .fu-layout.fu-layout-page-header-behaviour-type_fixed.fu-layout-page-header-header[_ngcontent-%COMP%]   .fu-content-holder[_ngcontent-%COMP%]   .fu-layout-page-header[_ngcontent-%COMP%]{opacity:1}[_nghost-%COMP%]   .fu-layout.fu-layout-page-header-behaviour-type_fixed.fu-layout-page-header-header[_ngcontent-%COMP%]   .fu-content-holder[_ngcontent-%COMP%]   .fu-layout-page-header[_ngcontent-%COMP%]   .fu-layout-page-header-title[_ngcontent-%COMP%]{opacity:0}", "\n\n\n@media (min-width: 768px) and (max-width: 1279.98px){[_nghost-%COMP%]:not(.fu-force-desktop)   .fu-layout[_ngcontent-%COMP%]   .fu-header-holder.fu-sidebar-closed-hovered[_ngcontent-%COMP%]{padding-left:var(--layout-sidebar-width, 220px)}[_nghost-%COMP%]:not(.fu-force-desktop)   .fu-layout[_ngcontent-%COMP%]   .fu-sidebar-holder[_ngcontent-%COMP%]{display:block;width:0px}[_nghost-%COMP%]:not(.fu-force-desktop)   .fu-layout[_ngcontent-%COMP%]   .fu-screen-size-detection[_ngcontent-%COMP%]{content:\"Tablet\"}}", "\n\n\n@media (max-width: 767.98px){[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-header-holder.fu-sidebar-closed-hovered[_ngcontent-%COMP%]{padding-left:inherit}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-sidebar-holder[_ngcontent-%COMP%]{display:block;width:0px}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-layout-mobile-overlay[_ngcontent-%COMP%]{display:none;position:fixed;inset:0;background-color:#000;opacity:.5;overflow-x:auto;z-index:3008}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-layout-mobile-overlay.fu-sidebar-closed-hovered[_ngcontent-%COMP%]{display:inherit}[_nghost-%COMP%]   .fu-layout[_ngcontent-%COMP%]   .fu-screen-size-detection[_ngcontent-%COMP%]{content:\"Mobile\"}}", "\n\n\n.fu-light-theme[_nghost-%COMP%]{--layout-sidebar-border-right: solid 1px var(--fu-light-300, #e5e7e9);--layout-sidebar-backgroung-color: var(--fu-white, #ffffff);--layout-sidebar-delimiters-border: solid 1px var(--fu-light-300, #e5e7e9);--layout-sidebar-userdata-delimiters-border: solid 1px var(--fu-light-300, #e5e7e9);--layout-sidebar-user-data-color: var(--fu-dark-500, #0d148c);--layout-sidebar-user-logout-icon-color: rgba(13,10,140,.5);--layout-header-rigth-panel-border-right: none;--sidebar-menu-item-color: var(--fu-dark-500, #0d148c);--sidebar-menu-link-item-color: var(--fu-primary-500, #3083ff);--sidebar-menu-item-hover-background-color: var(--fu-light-100, #f7f8f9);--sidebar-menu-item-icon-arrow-color: rgb(13, 20, 140, .5);--sidebar-menu-item-link-icon-color: rgb(13, 20, 140, .5);--sidebar-menu-item-open-color: var(--fu-primary-500, #3083ff);--sidebar-menu-item-open-background-color: var(--fu-white, #ffffff);--sidebar-menu-mobile-background-color: var(--fu-white, #ffffff);--sidebar-menu-item-selected-border-color: var(--fu-primary-300, #96c0ff);--sidebar-menu-sub-item-title-opacity: 1;--sidebar-menu-sub-item-title-color: var(--fu-light-700, #a9afb4);--sidebar-menu-sub-menu-item-color: var(--fu-light-900, #7b838c);--sidebar-menu-subitem-hover-background-color: var(--fu-light-100, #f7f8f9);--sidebar-menu-subitem-selected-color: var(--fu-primary-500, #3083ff);--sidebar-menu-subitem-selected-background-color: var(--fu-primary-100, #e2eeff);--sidebar-menu-subitem-mobile-border-top: solid 1px var(--fu-light-300, #e5e7e9);--sidebar-menu-item-mobile-selected-color: var(--fu-dark-500, #0d148c);--sidebar-menu-mobile-selected-background-color: var(--fu-primary-100, #e2eeff)}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LayoutComponent, [{
        type: Component,
        args: [{ selector: 'fusion-layout', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n    class=\"fu-layout fu-layout-page-header-behaviour-type_{{ pageHeaderBehaviourType$ | async }}\"\n    [class.fu-layout-page-header-header]=\"(pageHeaderPosition$ | async) === pageHeaderPositionEnum.OnLayoutHeader\"\n>\n    <!--sidebar with logo and menu-->\n    <div class=\"fu-sidebar-holder\">\n        <fusion-sidebar\n            [configuration]=\"sidebarConfiguration\"\n            [saveSidebarState]=\"!forceScreenMode\"\n            [(sidebarOpen)]=\"sidebarOpen\"\n            (logoClicked)=\"onLogoClicked()\"\n            (sidebarClosedHovered)=\"onSidebarClosedHovered($event)\"\n            (sidebarMenuItemClicked)=\"onSidebarMenuItemClicked($event)\"\n            (navigationEnded)=\"onNavigationEnded()\"\n            (logoutIconClicked)=\"onLogoutIconClicked($event)\"\n        ></fusion-sidebar>\n    </div>\n    <!--sidebar with logo and menu-->\n    <!--header-->\n    <div\n        class=\"fu-header-holder\"\n        [class.fu-layout-sidebar-closed]=\"!sidebarOpen\"\n        [class.fu-sidebar-closed-hovered]=\"sidebarClosedHovered$ | async\"\n    >\n        <fusion-layout-header\n            [configuration]=\"headerConfiguration\"\n            [sidebarOpen]=\"sidebarOpen\"\n            [showPageHeaderContent]=\"(pageHeaderPosition$ | async) === pageHeaderPositionEnum.OnLayoutHeader\"\n            (sidebarToggleIconClicked)=\"onSidebarStateChanged()\"\n            (layoutHeaderMenuItemClicked)=\"onHeaderMenuItemClicked($event)\"\n        ></fusion-layout-header>\n    </div>\n    <!--header-->\n    <!--content-->\n    <div class=\"fu-content-holder\" id=\"fu-layout-main-view\" #mainContent>\n        <ng-container *ngIf=\"pageHeaderTitle$ | async as pageHeaderTitle\">\n            <div class=\"fu-layout-page-header\">\n                <div class=\"fu-layout-page-header-title\">{{ pageHeaderTitle?.text }}</div>\n                <div *ngIf=\"showPageHeaderContent(!!pageHeaderTitle?.content)\" class=\"fu-layout-page-header-content\">\n                    <fusion-dynamic-components [configuration]=\"pageHeaderTitle?.content\"></fusion-dynamic-components>\n                </div>\n            </div>\n        </ng-container>\n        <ng-content></ng-content>\n    </div>\n    <!--content-->\n    <!--mobile overlay-->\n    <div\n        class=\"fu-layout-mobile-overlay\"\n        [class.fu-sidebar-closed-hovered]=\"sidebarClosedHovered$ | async\"\n        (click)=\"onMobileOverlayClicked()\"\n    ></div>\n    <!--media size detection-->\n    <div class=\"fu-screen-size-detection\" #mediaSize></div>\n</div>\n", styles: ["/*!\n * Created on 2020.12.6 By Andy Kononenko (andyk@ironsrc.com)\n */:host .fu-layout .fu-content-holder .fu-layout-page-header .fu-layout-page-header-title{font-size:60px;font-family:NHaasGroteskDSPro-75Bd,sans-serif}:host *{box-sizing:border-box}:host{margin:0;padding:0;vertical-align:initial;text-align:initial}:host .fu-layout{display:grid;grid-template-columns:min-content 1fr;grid-template-rows:var(--layout-header-height, 64px) auto;width:100vw;height:100vh}:host .fu-layout .fu-sidebar-holder{grid-row:span 2}:host .fu-layout .fu-header-holder{height:var(--layout-header-height, 64px);transition:padding-left .3s ease-out}:host .fu-layout .fu-header-holder.fu-sidebar-closed-hovered{padding-left:calc(var(--layout-sidebar-width, 220px) - var(--layout-sidebar-closed-width, 72px))}:host .fu-layout .fu-content-holder{height:calc(100vh - var(--layout-header-height, 64px) - 1px);margin-top:1px;overflow-y:auto}:host .fu-layout .fu-content-holder .fu-layout-page-header{height:var(--layout-page-header-height, 72px);margin:var(--layout-page-header-margin, 0 30px);display:flex;align-items:center;transition:opacity .3s ease-out}:host .fu-layout .fu-content-holder .fu-layout-page-header .fu-layout-page-header-title{color:var(--layout-page-header-title-color, var(--fu-dark-500, #0d148c));line-height:1;white-space:nowrap}:host .fu-layout .fu-content-holder .fu-layout-page-header .fu-layout-page-header-content{flex-grow:1}:host .fu-layout .fu-layout-mobile-overlay{display:none}:host .fu-layout .fu-screen-size-detection{content:\"Desktop\"}:host .fu-layout.fu-layout-page-header-behaviour-type_fixed .fu-content-holder .fu-layout-page-header .fu-layout-page-header-content{position:fixed;z-index:1010;right:40px}:host .fu-layout.fu-layout-page-header-header .fu-content-holder .fu-layout-page-header{opacity:0}:host .fu-layout.fu-layout-page-header-behaviour-type_fixed.fu-layout-page-header-header .fu-content-holder .fu-layout-page-header{opacity:1}:host .fu-layout.fu-layout-page-header-behaviour-type_fixed.fu-layout-page-header-header .fu-content-holder .fu-layout-page-header .fu-layout-page-header-title{opacity:0}\n", "/*!\n * Created on 2020.12.6 By Andy Kononenko (andyk@ironsrc.com)\n */@media (min-width: 768px) and (max-width: 1279.98px){:host:not(.fu-force-desktop) .fu-layout .fu-header-holder.fu-sidebar-closed-hovered{padding-left:var(--layout-sidebar-width, 220px)}:host:not(.fu-force-desktop) .fu-layout .fu-sidebar-holder{display:block;width:0px}:host:not(.fu-force-desktop) .fu-layout .fu-screen-size-detection{content:\"Tablet\"}}\n", "/*!\n * Created on 2020.12.6 By Andy Kononenko (andyk@ironsrc.com)\n */@media (max-width: 767.98px){:host .fu-layout .fu-header-holder.fu-sidebar-closed-hovered{padding-left:inherit}:host .fu-layout .fu-sidebar-holder{display:block;width:0px}:host .fu-layout .fu-layout-mobile-overlay{display:none;position:fixed;inset:0;background-color:#000;opacity:.5;overflow-x:auto;z-index:3008}:host .fu-layout .fu-layout-mobile-overlay.fu-sidebar-closed-hovered{display:inherit}:host .fu-layout .fu-screen-size-detection{content:\"Mobile\"}}\n", "/*!\n * Created on 2020.12.6 By Andy Kononenko (andyk@ironsrc.com)\n */:host.fu-light-theme{--layout-sidebar-border-right: solid 1px var(--fu-light-300, #e5e7e9);--layout-sidebar-backgroung-color: var(--fu-white, #ffffff);--layout-sidebar-delimiters-border: solid 1px var(--fu-light-300, #e5e7e9);--layout-sidebar-userdata-delimiters-border: solid 1px var(--fu-light-300, #e5e7e9);--layout-sidebar-user-data-color: var(--fu-dark-500, #0d148c);--layout-sidebar-user-logout-icon-color: rgba(13,10,140,.5);--layout-header-rigth-panel-border-right: none;--sidebar-menu-item-color: var(--fu-dark-500, #0d148c);--sidebar-menu-link-item-color: var(--fu-primary-500, #3083ff);--sidebar-menu-item-hover-background-color: var(--fu-light-100, #f7f8f9);--sidebar-menu-item-icon-arrow-color: rgb(13, 20, 140, .5);--sidebar-menu-item-link-icon-color: rgb(13, 20, 140, .5);--sidebar-menu-item-open-color: var(--fu-primary-500, #3083ff);--sidebar-menu-item-open-background-color: var(--fu-white, #ffffff);--sidebar-menu-mobile-background-color: var(--fu-white, #ffffff);--sidebar-menu-item-selected-border-color: var(--fu-primary-300, #96c0ff);--sidebar-menu-sub-item-title-opacity: 1;--sidebar-menu-sub-item-title-color: var(--fu-light-700, #a9afb4);--sidebar-menu-sub-menu-item-color: var(--fu-light-900, #7b838c);--sidebar-menu-subitem-hover-background-color: var(--fu-light-100, #f7f8f9);--sidebar-menu-subitem-selected-color: var(--fu-primary-500, #3083ff);--sidebar-menu-subitem-selected-background-color: var(--fu-primary-100, #e2eeff);--sidebar-menu-subitem-mobile-border-top: solid 1px var(--fu-light-300, #e5e7e9);--sidebar-menu-item-mobile-selected-color: var(--fu-dark-500, #0d148c);--sidebar-menu-mobile-selected-background-color: var(--fu-primary-100, #e2eeff)}\n"] }]
    }], () => [{ type: i0.ChangeDetectorRef }], { configuration: [{
            type: Input
        }], sidebarDynamicContent: [{
            type: Input
        }], forceScreenMode: [{
            type: Input
        }], menuSidebarItemClicked: [{
            type: Output
        }], menuHeaderItemClicked: [{
            type: Output
        }], routeNavigationEnded: [{
            type: Output
        }], userLogout: [{
            type: Output
        }], logoClicked: [{
            type: Output
        }], mainContent: [{
            type: ViewChild,
            args: ['mainContent', { static: true }]
        }], mediaSizeDetector: [{
            type: ViewChild,
            args: ['mediaSize', { static: true }]
        }], forceModeClass: [{
            type: HostBinding,
            args: ['class']
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LayoutComponent, { className: "LayoutComponent", filePath: "layout.component.ts", lineNumber: 40 }); })();

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

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

class LayoutModule {
    static forRoot(options) {
        return {
            ngModule: LayoutModule,
            providers: [
                {
                    provide: SVG_OPTIONS_TOKEN,
                    useValue: options ? options.svgOptions : LAYOUT_OPTIONS_DEFAULT_VALUE
                }
            ]
        };
    }
    static { this.ɵfac = function LayoutModule_Factory(t) { return new (t || LayoutModule)(); }; }
    static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: LayoutModule }); }
    static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, LayoutHeaderModule, SidebarModule, IconModule, DynamicComponentsModule] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LayoutModule, [{
        type: NgModule,
        args: [{
                declarations: [LayoutComponent],
                imports: [CommonModule, LayoutHeaderModule, SidebarModule, IconModule, DynamicComponentsModule],
                exports: [LayoutComponent]
            }]
    }], null, null); })();
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(LayoutModule, { declarations: [LayoutComponent], imports: [CommonModule, LayoutHeaderModule, SidebarModule, IconModule, DynamicComponentsModule], exports: [LayoutComponent] }); })();

/*
 * Created on 2020.11.25 By Andy Kononenko (andyk@ironsrc.com)
 */

// Layout-v2

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

export { LayoutComponent, LayoutHeaderComponent, LayoutHeaderMenuComponent, LayoutHeaderMenuModule, LayoutHeaderModule, LayoutMediaType, LayoutModule, PageHeaderPosition };
//# sourceMappingURL=ironsource-fusion-ui-components-layout-v2.mjs.map
