import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { SIDEBAR_TOGGLE_ICON, USER_ICON_NAME } from './layout-header.config';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ironsource/fusion-ui/components/icon/v1";
import * as i3 from "@ironsource/fusion-ui/components/dynamic-components/v1";
import * as i4 from "@ironsource/fusion-ui/directives/click-outside";
import * as i5 from "./layout-header-menu/layout-header-menu.component";
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 = () => ({ 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));
} }
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);
} }
export 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, i5.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 }); })();
//# sourceMappingURL=data:application/json;base64, 