/**
 * SuiteCRM is a customer relationship management program developed by SalesAgility Ltd.
 * Copyright (C) 2021 SalesAgility Ltd.
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY SALESAGILITY, SALESAGILITY DISCLAIMS THE
 * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License
 * version 3, these Appropriate Legal Notices must retain the display of the
 * "Supercharged by SuiteCRM" logo. If the display of the logos is not reasonably
 * feasible for technical reasons, the Appropriate Legal Notices must display
 * the words "Supercharged by SuiteCRM".
 */
import { Component, ElementRef, HostListener, signal, ViewChild } from '@angular/core';
import { combineLatestWith } from 'rxjs';
import { filter, map, take } from 'rxjs/operators';
import { NavbarAbstract } from '../navbar.abstract';
import { transition, trigger, useAnimation } from '@angular/animations';
import { backInDown } from 'ng-animate';
import { ActionNameMapper } from '../../../services/navigation/action-name-mapper/action-name-mapper.service';
import { SystemConfigStore } from '../../../store/system-config/system-config.store';
import { NavigationStore } from '../../../store/navigation/navigation.store';
import { UserPreferenceStore } from '../../../store/user-preference/user-preference.store';
import { ScreenSize, ScreenSizeObserverService } from '../../../services/ui/screen-size-observer/screen-size-observer.service';
import { RouteConverter } from '../../../services/navigation/route-converter/route-converter.service';
import { LanguageStore } from '../../../store/language/language.store';
import { ModuleNavigation } from '../../../services/navigation/module-navigation/module-navigation.service';
import { ModuleNameMapper } from '../../../services/navigation/module-name-mapper/module-name-mapper.service';
import { AppStateStore } from '../../../store/app-state/app-state.store';
import { AuthService } from '../../../services/auth/auth.service';
import { ready } from 'common';
import { AsyncActionService } from '../../../services/process/processes/async-action/async-action';
import { NotificationStore } from "../../../store/notification/notification.store";
import { GlobalRecentlyViewedStore } from "../../../store/global-recently-viewed/global-recently-viewed.store";
import { GlobalSearch } from "../../../services/navigation/global-search/global-search.service";
import { BreakpointObserver, Breakpoints } from "@angular/cdk/layout";
import { SearchBarComponent } from "../../search-bar/search-bar.component";
import { NavigationEnd, Router } from "@angular/router";
import { NgbDropdown } from "@ng-bootstrap/ng-bootstrap";
import * as i0 from "@angular/core";
import * as i1 from "../../../store/navigation/navigation.store";
import * as i2 from "../../../store/language/language.store";
import * as i3 from "../../../store/user-preference/user-preference.store";
import * as i4 from "../../../store/system-config/system-config.store";
import * as i5 from "../../../store/app-state/app-state.store";
import * as i6 from "../../../services/auth/auth.service";
import * as i7 from "../../../services/navigation/module-navigation/module-navigation.service";
import * as i8 from "../../../services/ui/screen-size-observer/screen-size-observer.service";
import * as i9 from "../../../services/process/processes/async-action/async-action";
import * as i10 from "../../../store/notification/notification.store";
import * as i11 from "../../../store/global-recently-viewed/global-recently-viewed.store";
import * as i12 from "../../../services/navigation/global-search/global-search.service";
import * as i13 from "@angular/cdk/layout";
import * as i14 from "@angular/router";
import * as i15 from "@angular/common";
import * as i16 from "../../logo/logo.component";
import * as i17 from "../../logout/logout.component";
import * as i18 from "@ng-bootstrap/ng-bootstrap";
import * as i19 from "../../image/image.component";
import * as i20 from "../../label/label.component";
import * as i21 from "../../../containers/notifications/notifications.component";
import * as i22 from "../../search-bar/search-bar.component";
import * as i23 from "../recently-viewed/recently-viewed.component";
import * as i24 from "../menu-item/menu-item.component";
import * as i25 from "../home-menu-item/home-menu-item.component";
import * as i26 from "../grouped-menu-item/grouped-menu-item.component";
import * as i27 from "../menu-items-list/menu-items-list.component";
const _c0 = ["mobileGlobalLinkTitle"];
const _c1 = ["searchTerm"];
const _c2 = ["alertDropdown"];
function BaseNavbarComponent_div_0_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "nav", 5)(1, "div", 6)(2, "ul", 7)(3, "li", 8);
    i0.ɵɵtext(4, "\u00A0 ");
    i0.ɵɵelementEnd()()()();
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "nav", 9)(2, "div", 10)(3, "ul", 7)(4, "li", 11);
    i0.ɵɵelement(5, "scrm-logo-ui");
    i0.ɵɵelementEnd()()()();
    i0.ɵɵelementContainerEnd();
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_2_li_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "li", 29);
    i0.ɵɵelement(1, "scrm-menu-item", 30);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r9 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("item", ctx_r9.navbar.current);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_2_li_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "li", 31);
    i0.ɵɵelement(1, "scrm-grouped-menu-item", 32);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r10 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("item", ctx_r10.navbar.current)("subNavCollapse", ctx_r10.subNavCollapse);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_2_ng_container_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_2_ng_template_19_ng_container_0_hr_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "hr");
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_2_ng_template_19_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "a", 34);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(3, BaseNavbarComponent_div_0_ng_container_2_ng_container_2_ng_template_19_ng_container_0_hr_3_Template, 1, 0, "hr", 3);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const globalAction_r15 = ctx.$implicit;
    const first_r16 = ctx.first;
    const last_r17 = ctx.last;
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("href", globalAction_r15.link.url, i0.ɵɵsanitizeUrl);
    i0.ɵɵpropertyInterpolate("target", globalAction_r15.link.target);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1("", globalAction_r15.link.label, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", last_r17 === true || first_r16 === true);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_2_ng_template_19_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, BaseNavbarComponent_div_0_ng_container_2_ng_container_2_ng_template_19_ng_container_0_Template, 4, 4, "ng-container", 33);
} if (rf & 2) {
    const ctx_r13 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("ngForOf", ctx_r13.navbar.globalActions);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    const _r20 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "ul", 12)(2, "div", 13)(3, "button", 14);
    i0.ɵɵlistener("click", function BaseNavbarComponent_div_0_ng_container_2_ng_container_2_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r19.toggleSidebar()); });
    i0.ɵɵelement(4, "scrm-image", 15);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "nav", 16)(6, "ul", 17);
    i0.ɵɵtemplate(7, BaseNavbarComponent_div_0_ng_container_2_ng_container_2_li_7_Template, 2, 1, "li", 18);
    i0.ɵɵtemplate(8, BaseNavbarComponent_div_0_ng_container_2_ng_container_2_li_8_Template, 2, 2, "li", 19);
    i0.ɵɵelementEnd()()();
    i0.ɵɵelementStart(9, "div", 20);
    i0.ɵɵtemplate(10, BaseNavbarComponent_div_0_ng_container_2_ng_container_2_ng_container_10_Template, 1, 0, "ng-container", 21);
    i0.ɵɵelementStart(11, "div", 22)(12, "li", 23)(13, "a", 24, 25);
    i0.ɵɵelement(15, "scrm-image", 26);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(16, "div", 27)(17, "span", 28);
    i0.ɵɵtext(18);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(19, BaseNavbarComponent_div_0_ng_container_2_ng_container_2_ng_template_19_Template, 1, 1, "ng-template", 2);
    i0.ɵɵelement(20, "scrm-logout-ui");
    i0.ɵɵelementEnd()()()()();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const _r12 = i0.ɵɵreference(14);
    i0.ɵɵnextContext(2);
    const _r4 = i0.ɵɵreference(4);
    const ctx_r7 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngClass", ctx_r7.isSmallScreen() && ctx_r7.isSearchBoxVisible() ? "d-none" : "d-block");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r7.navbar.current && !ctx_r7.navbar.current.isGroupedMenu);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r7.navbar.current == null ? null : ctx_r7.navbar.current.submenu) && ctx_r7.navbar.current.isGroupedMenu);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngTemplateOutlet", _r4);
    i0.ɵɵadvance(6);
    i0.ɵɵstyleProp("min-width", _r12.offsetWidth, "px");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2("", ctx_r7.navbar.currentUser.firstName, " ", ctx_r7.navbar.currentUser.lastName, "");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r7.navbar.globalActions);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_4_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "li", 44);
    i0.ɵɵelement(2, "scrm-grouped-menu-item", 45);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r25 = i0.ɵɵnextContext(5);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("item", ctx_r25.navbar.current)("subNavCollapse", ctx_r25.subNavCollapse)("index", 1);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_4_li_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "li", 46);
    i0.ɵɵelement(1, "scrm-menu-item", 47);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r26 = i0.ɵɵnextContext(5);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("item", ctx_r26.navbar.current)("index", 1);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_4_li_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "li", 44);
    i0.ɵɵelement(1, "scrm-grouped-menu-item", 45);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r28 = ctx.$implicit;
    const i_r29 = ctx.index;
    const ctx_r27 = i0.ɵɵnextContext(5);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("item", item_r28)("subNavCollapse", ctx_r27.subNavCollapse)("index", i_r29 + 2);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "ul", 40);
    i0.ɵɵtemplate(2, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_4_ng_container_2_Template, 3, 3, "ng-container", 3);
    i0.ɵɵtemplate(3, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_4_li_3_Template, 2, 2, "li", 41);
    i0.ɵɵtemplate(4, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_4_li_4_Template, 2, 3, "li", 42);
    i0.ɵɵelementEnd();
    i0.ɵɵelement(5, "scrm-menu-items-list", 43);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r21 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r21.navbar.current && ctx_r21.navbar.current.isGroupedMenu);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r21.navbar.current && !ctx_r21.navbar.current.isGroupedMenu);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r21.navbar.menu);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("items", ctx_r21.navbar.all.modules)("index", ctx_r21.navbar.menu.length + 2);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_5_li_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "li", 46);
    i0.ɵɵelement(1, "scrm-menu-item", 47);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r30 = i0.ɵɵnextContext(5);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("item", ctx_r30.navbar.current)("index", 1);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_5_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "li", 44);
    i0.ɵɵelement(2, "scrm-grouped-menu-item", 45);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r31 = i0.ɵɵnextContext(5);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("item", ctx_r31.navbar.current)("subNavCollapse", ctx_r31.subNavCollapse)("index", 1);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_5_li_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "li", 50);
    i0.ɵɵelement(1, "scrm-menu-item", 47);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r33 = ctx.$implicit;
    const i_r34 = ctx.index;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("item", item_r33)("index", i_r34 + 2);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "ul", 7);
    i0.ɵɵtemplate(2, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_5_li_2_Template, 2, 2, "li", 41);
    i0.ɵɵtemplate(3, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_5_ng_container_3_Template, 3, 3, "ng-container", 3);
    i0.ɵɵtemplate(4, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_5_li_4_Template, 2, 2, "li", 48);
    i0.ɵɵelementEnd();
    i0.ɵɵelement(5, "scrm-menu-items-list", 49);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r22 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r22.navbar.current && !ctx_r22.navbar.current.isGroupedMenu);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r22.navbar.current == null ? null : ctx_r22.navbar.current.submenu) && ctx_r22.navbar.current.isGroupedMenu);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r22.navbar.menu);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("items", ctx_r22.navbar.all.modules)("index", ctx_r22.navbar.menu.length + 2);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_15_ng_container_1_hr_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "hr");
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_15_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "a", 34);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(3, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_15_ng_container_1_hr_3_Template, 1, 0, "hr", 3);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const globalAction_r36 = ctx.$implicit;
    const first_r37 = ctx.first;
    const last_r38 = ctx.last;
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("href", globalAction_r36.link.url, i0.ɵɵsanitizeUrl);
    i0.ɵɵpropertyInterpolate("target", globalAction_r36.link.target);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1("", globalAction_r36.link.label, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", last_r38 === true || first_r37 === true);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_15_ng_container_1_Template, 4, 4, "ng-container", 33);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r24 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r24.navbar.globalActions);
} }
function BaseNavbarComponent_div_0_ng_container_2_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "nav", 35)(2, "div", 36);
    i0.ɵɵelement(3, "scrm-home-menu-item", 37);
    i0.ɵɵtemplate(4, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_4_Template, 6, 5, "ng-container", 3);
    i0.ɵɵtemplate(5, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_5_Template, 6, 5, "ng-container", 3);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_6_Template, 1, 0, "ng-container", 21);
    i0.ɵɵelementStart(7, "div", 22)(8, "ul", 7)(9, "li", 23)(10, "a", 38);
    i0.ɵɵelement(11, "scrm-image", 26);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "div", 39)(13, "span", 28);
    i0.ɵɵtext(14);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(15, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_ng_container_15_Template, 2, 1, "ng-container", 3);
    i0.ɵɵelement(16, "scrm-logout-ui");
    i0.ɵɵelementEnd()()()()();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const vm_r1 = i0.ɵɵnextContext(2).ngIf;
    const _r4 = i0.ɵɵreference(4);
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngbCollapse", ctx_r8.mainNavCollapse);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("active", vm_r1.appState.module && vm_r1.appState.module === "home")("route", ctx_r8.getHomePage());
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", vm_r1.userPreferences["navigation_paradigm"] == "gm");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", vm_r1.userPreferences["navigation_paradigm"] != "gm");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", _r4);
    i0.ɵɵadvance(8);
    i0.ɵɵtextInterpolate2("", ctx_r8.navbar.currentUser.firstName, " ", ctx_r8.navbar.currentUser.lastName, "");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r8.navbar.globalActions);
} }
function BaseNavbarComponent_div_0_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, BaseNavbarComponent_div_0_ng_container_2_ng_container_1_Template, 6, 0, "ng-container", 3);
    i0.ɵɵtemplate(2, BaseNavbarComponent_div_0_ng_container_2_ng_container_2_Template, 21, 9, "ng-container", 3);
    i0.ɵɵtemplate(3, BaseNavbarComponent_div_0_ng_container_2_ng_container_3_Template, 17, 9, "ng-container", 3);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !ctx_r3.isUserLoggedIn);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.isUserLoggedIn && ctx_r3.mobileNavbar);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.isUserLoggedIn && !ctx_r3.mobileNavbar);
} }
function BaseNavbarComponent_div_0_ng_template_3_ng_container_7_li_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "a", 73);
    i0.ɵɵelement(2, "scrm-label", 74);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const moduleQuickAction_r46 = i0.ɵɵnextContext().$implicit;
    const ctx_r47 = i0.ɵɵnextContext(4);
    let tmp_1_0;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("routerLink", moduleQuickAction_r46.url)("queryParams", (tmp_1_0 = moduleQuickAction_r46 == null ? null : moduleQuickAction_r46.params) !== null && tmp_1_0 !== undefined ? tmp_1_0 : null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("labelKey", moduleQuickAction_r46.labelKey)("module", ctx_r47.navbar.current.module);
} }
function BaseNavbarComponent_div_0_ng_template_3_ng_container_7_li_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    const _r52 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "a", 75);
    i0.ɵɵlistener("click", function BaseNavbarComponent_div_0_ng_template_3_ng_container_7_li_3_ng_container_2_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r52); const moduleQuickAction_r46 = i0.ɵɵnextContext().$implicit; const ctx_r50 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r50.handleProcess(moduleQuickAction_r46)); });
    i0.ɵɵelement(2, "scrm-label", 74);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const moduleQuickAction_r46 = i0.ɵɵnextContext().$implicit;
    const ctx_r48 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("labelKey", moduleQuickAction_r46.labelKey)("module", ctx_r48.navbar.current.module);
} }
function BaseNavbarComponent_div_0_ng_template_3_ng_container_7_li_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "li", 72);
    i0.ɵɵtemplate(1, BaseNavbarComponent_div_0_ng_template_3_ng_container_7_li_3_ng_container_1_Template, 3, 4, "ng-container", 3);
    i0.ɵɵtemplate(2, BaseNavbarComponent_div_0_ng_template_3_ng_container_7_li_3_ng_container_2_Template, 3, 2, "ng-container", 3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const moduleQuickAction_r46 = ctx.$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !moduleQuickAction_r46.process);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", moduleQuickAction_r46.process);
} }
function BaseNavbarComponent_div_0_ng_template_3_ng_container_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "li", 69);
    i0.ɵɵelement(2, "scrm-label", 70);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(3, BaseNavbarComponent_div_0_ng_template_3_ng_container_7_li_3_Template, 3, 2, "li", 71);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r41 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("module", ctx_r41.navbar.current.module);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r41.currentQuickActions);
} }
function BaseNavbarComponent_div_0_ng_template_3_ng_container_8_li_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "a", 73);
    i0.ɵɵelement(2, "scrm-label", 74);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const quickAction_r55 = i0.ɵɵnextContext().$implicit;
    let tmp_1_0;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("routerLink", quickAction_r55.url)("queryParams", (tmp_1_0 = quickAction_r55 == null ? null : quickAction_r55.params) !== null && tmp_1_0 !== undefined ? tmp_1_0 : null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("labelKey", quickAction_r55.labelKey)("module", quickAction_r55.module);
} }
function BaseNavbarComponent_div_0_ng_template_3_ng_container_8_li_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    const _r61 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "a", 75);
    i0.ɵɵlistener("click", function BaseNavbarComponent_div_0_ng_template_3_ng_container_8_li_3_ng_container_2_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r61); const quickAction_r55 = i0.ɵɵnextContext().$implicit; const ctx_r59 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r59.handleProcess(quickAction_r55)); });
    i0.ɵɵelement(2, "scrm-label", 74);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const quickAction_r55 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("labelKey", quickAction_r55.labelKey)("module", quickAction_r55.module);
} }
function BaseNavbarComponent_div_0_ng_template_3_ng_container_8_li_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "li", 72);
    i0.ɵɵtemplate(1, BaseNavbarComponent_div_0_ng_template_3_ng_container_8_li_3_ng_container_1_Template, 3, 4, "ng-container", 3);
    i0.ɵɵtemplate(2, BaseNavbarComponent_div_0_ng_template_3_ng_container_8_li_3_ng_container_2_Template, 3, 2, "ng-container", 3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const quickAction_r55 = ctx.$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !quickAction_r55.process);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", quickAction_r55.process);
} }
const _c3 = function () { return []; };
function BaseNavbarComponent_div_0_ng_template_3_ng_container_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "li", 69);
    i0.ɵɵelement(2, "scrm-label", 76);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(3, BaseNavbarComponent_div_0_ng_template_3_ng_container_8_li_3_Template, 3, 2, "li", 71);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r42 = i0.ɵɵnextContext(3);
    let tmp_0_0;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngForOf", (tmp_0_0 = ctx_r42 == null ? null : ctx_r42.navigation == null ? null : ctx_r42.navigation.quickActions) !== null && tmp_0_0 !== undefined ? tmp_0_0 : i0.ɵɵpureFunction0(1, _c3));
} }
function BaseNavbarComponent_div_0_ng_template_3_div_24_ng_container_6_span_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtext(1);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const notificationCount_r65 = i0.ɵɵnextContext(2).ngIf;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(notificationCount_r65);
} }
function BaseNavbarComponent_div_0_ng_template_3_div_24_ng_container_6_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 83);
    i0.ɵɵtemplate(1, BaseNavbarComponent_div_0_ng_template_3_div_24_ng_container_6_span_1_ng_container_1_Template, 2, 1, "ng-container", 3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const notificationCount_r65 = i0.ɵɵnextContext().ngIf;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", notificationCount_r65 > 0);
} }
function BaseNavbarComponent_div_0_ng_template_3_div_24_ng_container_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, BaseNavbarComponent_div_0_ng_template_3_div_24_ng_container_6_span_1_Template, 2, 1, "span", 82);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const notificationCount_r65 = ctx.ngIf;
    let tmp_0_0;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (tmp_0_0 = notificationCount_r65) !== null && tmp_0_0 !== undefined ? tmp_0_0 : false);
} }
function BaseNavbarComponent_div_0_ng_template_3_div_24_Template(rf, ctx) { if (rf & 1) {
    const _r71 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 77, 78)(2, "ul", 53)(3, "li", 23)(4, "a", 79);
    i0.ɵɵlistener("mouseenter", function BaseNavbarComponent_div_0_ng_template_3_div_24_Template_a_mouseenter_4_listener() { i0.ɵɵrestoreView(_r71); const ctx_r70 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r70.markAsRead()); });
    i0.ɵɵelement(5, "scrm-image", 80);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, BaseNavbarComponent_div_0_ng_template_3_div_24_ng_container_6_Template, 2, 1, "ng-container", 3);
    i0.ɵɵpipe(7, "async");
    i0.ɵɵelementStart(8, "div", 81);
    i0.ɵɵlistener("click", function BaseNavbarComponent_div_0_ng_template_3_div_24_Template_div_click_8_listener() { i0.ɵɵrestoreView(_r71); const ctx_r72 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r72.closeNotificationMenu()); });
    i0.ɵɵelement(9, "scrm-notifications");
    i0.ɵɵelementEnd()()()();
} if (rf & 2) {
    const ctx_r44 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(6);
    i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(7, 1, ctx_r44.notificationCount$));
} }
function BaseNavbarComponent_div_0_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    const _r74 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 51)(1, "div", 52)(2, "ul", 53)(3, "li", 23)(4, "a", 54);
    i0.ɵɵelement(5, "scrm-image", 55);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "ul", 56);
    i0.ɵɵtemplate(7, BaseNavbarComponent_div_0_ng_template_3_ng_container_7_Template, 4, 2, "ng-container", 3);
    i0.ɵɵtemplate(8, BaseNavbarComponent_div_0_ng_template_3_ng_container_8_Template, 4, 2, "ng-container", 3);
    i0.ɵɵelementEnd()()()();
    i0.ɵɵelementStart(9, "div", 57)(10, "ul", 53)(11, "li", 23)(12, "a", 58);
    i0.ɵɵelement(13, "scrm-image", 59);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "div", 60);
    i0.ɵɵelement(15, "scrm-recently-viewed", 61);
    i0.ɵɵpipe(16, "slice");
    i0.ɵɵpipe(17, "async");
    i0.ɵɵelementEnd()()()();
    i0.ɵɵelementStart(18, "div", 62)(19, "a", 63);
    i0.ɵɵlistener("click", function BaseNavbarComponent_div_0_ng_template_3_Template_a_click_19_listener() { i0.ɵɵrestoreView(_r74); const ctx_r73 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r73.openSearchBox()); });
    i0.ɵɵelement(20, "scrm-image", 64);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(21, "div", 65)(22, "scrm-search-bar", 66, 67);
    i0.ɵɵlistener("isSearchVisible", function BaseNavbarComponent_div_0_ng_template_3_Template_scrm_search_bar_isSearchVisible_22_listener($event) { i0.ɵɵrestoreView(_r74); const ctx_r75 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r75.closeSearchBox($event)); })("searchExpression", function BaseNavbarComponent_div_0_ng_template_3_Template_scrm_search_bar_searchExpression_22_listener($event) { i0.ɵɵrestoreView(_r74); const ctx_r76 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r76.search($event)); });
    i0.ɵɵelementEnd()()();
    i0.ɵɵtemplate(24, BaseNavbarComponent_div_0_ng_template_3_div_24_Template, 10, 3, "div", 68);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const vm_r1 = i0.ɵɵnextContext().ngIf;
    const ctx_r5 = i0.ɵɵnextContext();
    let tmp_2_0;
    let tmp_3_0;
    i0.ɵɵadvance(6);
    i0.ɵɵclassProp("dropdown-menu-right", !ctx_r5.mobileNavbar)("dropdown-menu-right-center", ctx_r5.mobileNavbar);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ((tmp_2_0 = ctx_r5.navbar == null ? null : ctx_r5.navbar.current == null ? null : ctx_r5.navbar.current.module) !== null && tmp_2_0 !== undefined ? tmp_2_0 : "") && ctx_r5.currentQuickActions.length);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ((tmp_3_0 = ctx_r5 == null ? null : ctx_r5.navigation == null ? null : ctx_r5.navigation.quickActions) !== null && tmp_3_0 !== undefined ? tmp_3_0 : i0.ɵɵpureFunction0(23, _c3)).length);
    i0.ɵɵadvance(6);
    i0.ɵɵclassProp("dropdown-menu-right", !ctx_r5.mobileNavbar);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("menuItems", i0.ɵɵpipeBind3(16, 17, i0.ɵɵpipeBind1(17, 21, ctx_r5.recentlyViewed$), 0, ctx_r5.recentlyViewedCount));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngClass", ctx_r5.isSearchBoxVisible() ? "d-none" : "d-block");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngClass", ctx_r5.isSearchBoxVisible() ? "d-block" : "d-none")("@mobileSearchBarAnm", undefined);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("labelKey", "LBL_SEARCH")("klass", "search-bar-global")("searchTrigger", "enter")("isMobile", ctx_r5.isSmallScreen());
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r5.notificationsEnabled && ctx_r5.checkAppStrings(vm_r1.appStrings) && ctx_r5.arePreferencesInitialized(vm_r1.userPreferences));
} }
function BaseNavbarComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 1);
    i0.ɵɵtemplate(1, BaseNavbarComponent_div_0_ng_template_1_Template, 5, 0, "ng-template", 2);
    i0.ɵɵtemplate(2, BaseNavbarComponent_div_0_ng_container_2_Template, 4, 3, "ng-container", 3);
    i0.ɵɵtemplate(3, BaseNavbarComponent_div_0_ng_template_3_Template, 25, 24, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !ctx_r0.loaded);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.loaded);
} }
class BaseNavbarComponent {
    static { this.instances = []; }
    constructor(navigationStore, languageStore, userPreferenceStore, systemConfigStore, appState, authService, moduleNavigation, screenSize, asyncActionService, notificationStore, globalRecentlyViewedStore, globalSearch, breakpointObserver, router) {
        this.navigationStore = navigationStore;
        this.languageStore = languageStore;
        this.userPreferenceStore = userPreferenceStore;
        this.systemConfigStore = systemConfigStore;
        this.appState = appState;
        this.authService = authService;
        this.moduleNavigation = moduleNavigation;
        this.screenSize = screenSize;
        this.asyncActionService = asyncActionService;
        this.notificationStore = notificationStore;
        this.globalRecentlyViewedStore = globalRecentlyViewedStore;
        this.globalSearch = globalSearch;
        this.breakpointObserver = breakpointObserver;
        this.router = router;
        this.loaded = true;
        this.mainNavCollapse = true;
        this.subNavCollapse = true;
        this.mobileSubNav = false;
        this.backLink = false;
        this.mainNavLink = true;
        this.submenu = [];
        this.moduleNameMapper = new ModuleNameMapper(this.systemConfigStore);
        this.actionNameMapper = new ActionNameMapper(this.systemConfigStore);
        this.routeConverter = new RouteConverter(this.moduleNameMapper, this.actionNameMapper, this.systemConfigStore);
        this.maxTabs = 8;
        this.screen = ScreenSize.Medium;
        this.notificationsEnabled = false;
        this.subs = [];
        this.mobileNavbar = false;
        this.isSmallScreen = signal(false);
        this.isTabletScreen = signal(false);
        this.recentlyViewedCount = 10;
        this.isSearchBoxVisible = signal(false);
        this.languages$ = this.languageStore.vm$;
        this.userPreferences$ = this.userPreferenceStore.userPreferences$;
        this.currentUser$ = this.authService.currentUser$;
        this.appState$ = this.appState.vm$;
        this.navigation$ = this.navigationStore.vm$;
        this.recentlyViewed$ = this.globalRecentlyViewedStore.globalRecentlyViewed$;
        this.vm$ = this.navigation$.pipe(combineLatestWith(this.userPreferences$, this.currentUser$, this.appState$, this.screenSize.screenSize$, this.languages$), map(([navigation, userPreferences, currentUser, appState, screenSize, language]) => {
            if (screenSize) {
                this.screen = screenSize;
                this.onResize();
            }
            if (navigation && navigation.modules) {
                this.navigation = navigation;
            }
            this.calculateMaxTabs(navigation);
            this.getModuleQuickActions(appState.module);
            this.navbar.resetMenu();
            if (ready([language.appStrings, language.modStrings, language.appListStrings, userPreferences, currentUser])) {
                this.navbar.build(navigation, currentUser, this.maxTabs);
            }
            return {
                navigation,
                userPreferences,
                appState,
                appStrings: language.appStrings || {},
                appListStrings: language.appListStrings || {}
            };
        }));
    }
    /**
     * Public API
     */
    onResize() {
        const innerWidth = window.innerWidth;
        this.mobileNavbar = innerWidth <= 768;
        this.isSmallScreen.set(innerWidth < 600);
        this.isTabletScreen.set(innerWidth <= 992);
        this.isSearchBoxVisible.set(innerWidth >= 600);
    }
    ngOnInit() {
        const navbar = new NavbarAbstract(this.routeConverter, this.moduleNavigation, this.userPreferenceStore, this.languageStore, this.appState, this.moduleNameMapper);
        this.setNavbar(navbar);
        this.authService.isUserLoggedIn.subscribe(value => {
            this.isUserLoggedIn = value;
        });
        window.dispatchEvent(new Event('resize'));
        this.notificationCount$ = this.notificationStore.notificationsUnreadTotal$;
        this.recentlyViewedCount = this.systemConfigStore.getUi('global_recently_viewed');
        this.subs.push(this.notificationStore.notificationsEnabled$.subscribe(notificationsEnabled => {
            this.notificationsEnabled = notificationsEnabled;
        }));
        this.subs.push(this.breakpointObserver.observe([
            Breakpoints.XSmall,
        ]).subscribe((result) => {
            let hasSearchTerm;
            if (!!this.searchTermRef?.searchForm.get('searchTerm').value) {
                hasSearchTerm = true;
            }
            else {
                hasSearchTerm = false;
            }
            if (result.matches && !hasSearchTerm) {
                this.isSearchBoxVisible.set(false);
            }
        }));
    }
    ngOnDestroy() {
        this.authService.isUserLoggedIn.unsubscribe();
        this.subs.forEach(sub => sub.unsubscribe());
    }
    checkAppStrings(appStrings) {
        return appStrings && Object.keys(appStrings).length > 0;
    }
    arePreferencesInitialized(preferences) {
        return preferences && Object.keys(preferences).length;
    }
    markAsRead() {
        this.notificationStore.markNotificationsAsRead();
    }
    ngAfterViewInit() {
        if (!this.mobileGlobalLinkTitle?.nativeElement?.offsetWidth) {
            return;
        }
        this.dropdownLength = this.mobileGlobalLinkTitle.nativeElement.offsetWidth;
    }
    /**
     * Change subnavigation
     *
     * @param {object} event triggered
     * @param {object} items
     */
    changeSubNav(event, items) {
        this.mobileSubNav = !this.mobileSubNav;
        this.backLink = !this.backLink;
        this.mainNavLink = !this.mainNavLink;
        this.submenu = items;
    }
    /**
     * Set link flags
     */
    navBackLink() {
        this.mobileSubNav = !this.mobileSubNav;
        this.backLink = !this.backLink;
        this.mainNavLink = !this.mainNavLink;
    }
    /**
     * Get home page
     *
     * @returns {string} homepage
     */
    getHomePage() {
        return this.systemConfigStore.getHomePage();
    }
    /**
     * Internal API
     */
    /**
     * Set navbar model
     *
     * @param {object} navbar model
     */
    setNavbar(navbar) {
        this.navbar = navbar;
        this.loaded = true;
    }
    /**
     * Check if is loaded
     *
     * @returns {{boolean}} is loaded
     */
    isLoaded() {
        return this.loaded;
    }
    calculateMaxTabs(navigation) {
        const sizeMap = this.systemConfigStore.getConfigValue('navigation_tab_limits');
        if (this.screen && sizeMap) {
            let maxTabs = sizeMap[this.screen];
            if (!maxTabs || navigation.maxTabs && navigation.maxTabs < maxTabs) {
                maxTabs = navigation.maxTabs;
            }
            this.maxTabs = maxTabs;
        }
    }
    getModuleQuickActions(module) {
        const moduleNavigation = this?.navigation?.modules[module] ?? null;
        const moduleNavigationMenu = moduleNavigation?.menu ?? [];
        if (moduleNavigation === null || !moduleNavigationMenu.length) {
            this.currentQuickActions = [];
        }
        const actions = [];
        moduleNavigationMenu.forEach(entry => {
            if (!entry.url || !entry.quickAction) {
                return;
            }
            const url = entry?.url ?? '';
            actions.push({
                ...entry,
                url: url.replace('/#/', '/')
            });
        });
        this.currentQuickActions = actions;
    }
    handleProcess(action) {
        if (!action.process) {
            return;
        }
        const processType = action.process;
        const options = {
            action: processType,
            module: action.module,
        };
        this.asyncActionService.run(processType, options).pipe(take(1)).subscribe();
    }
    openSearchBox() {
        if (this.isSmallScreen()) {
            this.isSearchBoxVisible.set(true);
        }
    }
    closeSearchBox(isVisible) {
        this.isSearchBoxVisible.set(isVisible);
    }
    search(searchTerm) {
        const searchController = this.systemConfigStore.getConfigValue('search')?.controller ?? '';
        this.globalSearch.navigateToSearch(searchTerm, searchController).finally();
    }
    toggleSidebar() {
        this.appState.toggleSidebar();
    }
    closeNotificationMenu() {
        this.subs.push(this.router.events.pipe(filter(event => event instanceof NavigationEnd), take(1)).subscribe(() => {
            this.alertDropdown.close();
        }));
    }
    static { this.ɵfac = function BaseNavbarComponent_Factory(t) { return new (t || BaseNavbarComponent)(i0.ɵɵdirectiveInject(i1.NavigationStore), i0.ɵɵdirectiveInject(i2.LanguageStore), i0.ɵɵdirectiveInject(i3.UserPreferenceStore), i0.ɵɵdirectiveInject(i4.SystemConfigStore), i0.ɵɵdirectiveInject(i5.AppStateStore), i0.ɵɵdirectiveInject(i6.AuthService), i0.ɵɵdirectiveInject(i7.ModuleNavigation), i0.ɵɵdirectiveInject(i8.ScreenSizeObserverService), i0.ɵɵdirectiveInject(i9.AsyncActionService), i0.ɵɵdirectiveInject(i10.NotificationStore), i0.ɵɵdirectiveInject(i11.GlobalRecentlyViewedStore), i0.ɵɵdirectiveInject(i12.GlobalSearch), i0.ɵɵdirectiveInject(i13.BreakpointObserver), i0.ɵɵdirectiveInject(i14.Router)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BaseNavbarComponent, selectors: [["scrm-base-navbar"]], viewQuery: function BaseNavbarComponent_Query(rf, ctx) { if (rf & 1) {
            i0.ɵɵviewQuery(_c0, 5);
            i0.ɵɵviewQuery(_c1, 5);
            i0.ɵɵviewQuery(_c2, 5);
        } if (rf & 2) {
            let _t;
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.mobileGlobalLinkTitle = _t.first);
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.searchTermRef = _t.first);
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.alertDropdown = _t.first);
        } }, hostBindings: function BaseNavbarComponent_HostBindings(rf, ctx) { if (rf & 1) {
            i0.ɵɵlistener("resize", function BaseNavbarComponent_resize_HostBindingHandler($event) { return ctx.onResize($event); }, false, i0.ɵɵresolveWindow);
        } }, decls: 2, vars: 3, consts: [["class", "top-panel fixed-top", 4, "ngIf"], [1, "top-panel", "fixed-top"], [3, "ngIf"], [4, "ngIf"], ["actionIcons", ""], [1, "navbar", "navbar-expand-lg"], [1, "navbar-collapse", "collapse", "order-4", "order-md-0", "collapsenav"], [1, "navbar-nav"], [1, "top-nav", "nav-item"], [1, "navbar", "ml-0", "pl-0"], [1, "navbar-collapse"], [1, "pl-0"], [1, "navbar", "mobile-nav-block", "mobilenavbar"], [1, "d-flex"], ["type", "button", 1, "navbar-toggler", 3, "click"], ["image", "hamburger", 1, "responsive-menu-toggler"], [1, "navbar-expand", 3, "ngClass"], [1, "navbar-nav", "h-100"], ["class", "top-nav nav-item dropdown mobile-navbar-active-module h-100 non-grouped", 4, "ngIf"], ["class", "top-nav nav-item dropdown mobile-navbar-active-module main-grouped", 4, "ngIf"], [1, "d-flex", "align-items-center"], [4, "ngTemplateOutlet"], ["ngbDropdown", "", 1, "global-links", "action-dropdown"], [1, "global-link-item"], ["ngbDropdownToggle", "", 1, "nav-link", "primary-global-link", "dropdown-toggle"], ["mobileGlobalLinkTitle", ""], ["image", "user", 1, "global-action-icon", "sicon-2x"], ["aria-labelledby", "navbarDropdownMenuLink", "ngbDropdownMenu", "", 1, "dropdown-menu", "global-links-dropdown", "border", "shadow-sm-2"], [1, "global-user-name"], [1, "top-nav", "nav-item", "dropdown", "mobile-navbar-active-module", "h-100", "non-grouped"], [3, "item"], [1, "top-nav", "nav-item", "dropdown", "mobile-navbar-active-module", "main-grouped"], [3, "item", "subNavCollapse"], [4, "ngFor", "ngForOf"], ["ngbDropdownItem", "", 1, "dropdown-item", "global-links-sublink", 3, "href", "target"], [1, "navbar", "navbar-expand-md", "navbar-1"], [1, "navbar-collapse", "collapse", "collapsenav", 3, "ngbCollapse"], [3, "active", "route"], ["ngbDropdownToggle", "", 1, "nav-link", "primary-global-link"], ["aria-labelledby", "navbarDropdownMenuLink", "ngbDropdownMenu", "", 1, "dropdown-menu", "global-links-dropdown", "border", "shadow-sm-2", "dropdown-menu-right"], [1, "navbar-nav", "grouped"], ["class", "top-nav nav-item dropdown non-grouped active", 4, "ngIf"], ["class", "top-nav nav-item dropdown main-grouped", 4, "ngFor", "ngForOf"], ["labelKey", "LBL_TABGROUP_ALL", 3, "items", "index"], [1, "top-nav", "nav-item", "dropdown", "main-grouped"], [3, "item", "subNavCollapse", "index"], [1, "top-nav", "nav-item", "dropdown", "non-grouped", "active"], [3, "item", "index"], ["class", "top-nav nav-item dropdown non-grouped", 4, "ngFor", "ngForOf"], ["labelKey", "LBL_MORE", 3, "items", "index"], [1, "top-nav", "nav-item", "dropdown", "non-grouped"], [1, "action-group", "navbar-action-group"], ["ngbDropdown", "", 1, "action-new", "action-dropdown"], [1, "navbar-nav", "border-0"], ["type", "button", "aria-label", "Quick Create", "ngbDropdownToggle", "", 1, "action-link", "primary-global-link"], ["image", "plus", 1, "action-btn-icon"], ["ngbDropdownMenu", "", 1, "dropdown-menu", "dropdown-menu-left", "border", "shadow-sm-2"], ["ngbDropdown", "", 1, "action-history", "action-dropdown"], ["type", "button", "aria-label", "Recently Viewed", "ngbDropdownToggle", "", 1, "action-link", "primary-global-link"], ["image", "recently_viewed", 1, "action-btn-icon"], ["ngbDropdownMenu", "", 1, "dropdown-menu", "border", "shadow-sm-2", "dropdown-menu-right", "scrollbar-thick", "recently-viewed-nav-header"], ["ngbDropdownItem", "", 1, "recently-viewed", 3, "menuItems"], [1, "d-flex", "align-items-center", "px-1", "action-search"], ["type", "button", "aria-label", "Search", 1, "search-mobile-view", "action-link", "primary-global-link", 3, "ngClass", "click"], ["image", "search", 1, "action-btn-icon"], [3, "ngClass"], [3, "labelKey", "klass", "searchTrigger", "isMobile", "isSearchVisible", "searchExpression"], ["searchTerm", ""], ["class", "action-alert action-dropdown", "ngbDropdown", "", 4, "ngIf"], [1, "new-list-item-header", "font-weight-bold"], ["labelKey", "LBL_MODULE_NAME", 3, "module"], ["class", "new-list-item", "ngbDropdownItem", "", 4, "ngFor", "ngForOf"], ["ngbDropdownItem", "", 1, "new-list-item"], [1, "d-flex", "align-items-center", 3, "routerLink", "queryParams"], [1, "new-list-item-label", 3, "labelKey", "module"], [1, "d-flex", "align-items-center", 3, "click"], ["labelKey", "LBL_QUICK_ACTIONS"], ["ngbDropdown", "", 1, "action-alert", "action-dropdown"], ["alertDropdown", "ngbDropdown"], ["type", "button", "ngbDropdownToggle", "", 1, "action-link", "primary-global-link", 3, "mouseenter"], ["image", "alert", 1, "action-btn-icon"], ["aria-labelledby", "navbarDropdownMenuLink", "ngbDropdownMenu", "", 1, "dropdown-menu", "border", "shadow-sm-2", "dropdown-menu-right", 3, "click"], ["class", "badge badge-position rounded-pill bg-danger text-white", 4, "ngIf"], [1, "badge", "badge-position", "rounded-pill", "bg-danger", "text-white"]], template: function BaseNavbarComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, BaseNavbarComponent_div_0_Template, 5, 2, "div", 0);
            i0.ɵɵpipe(1, "async");
        } if (rf & 2) {
            i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(1, 1, ctx.vm$));
        } }, dependencies: [i15.NgClass, i15.NgForOf, i15.NgIf, i15.NgTemplateOutlet, i16.LogoUiComponent, i17.LogoutUiComponent, i18.NgbCollapse, i18.NgbDropdown, i18.NgbDropdownToggle, i18.NgbDropdownMenu, i18.NgbDropdownItem, i14.RouterLink, i19.ImageComponent, i20.LabelComponent, i21.NotificationsComponent, i22.SearchBarComponent, i23.RecentlyViewedComponent, i24.MenuItemComponent, i25.HomeMenuItemComponent, i26.GroupedMenuItemComponent, i27.MenuItemsListComponent, i15.AsyncPipe, i15.SlicePipe], encapsulation: 2, data: { animation: [
                trigger('mobileSearchBarAnm', [
                    transition(':enter', useAnimation(backInDown, {
                        params: { timing: 0.5, delay: 0 }
                    })),
                ])
            ] } }); }
}
export { BaseNavbarComponent };
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseNavbarComponent, [{
        type: Component,
        args: [{ selector: 'scrm-base-navbar', animations: [
                    trigger('mobileSearchBarAnm', [
                        transition(':enter', useAnimation(backInDown, {
                            params: { timing: 0.5, delay: 0 }
                        })),
                    ])
                ], template: "<! --\n/**\n* SuiteCRM is a customer relationship management program developed by SalesAgility Ltd.\n* Copyright (C) 2021 SalesAgility Ltd.\n*\n* This program is free software; you can redistribute it and/or modify it under\n* the terms of the GNU Affero General Public License version 3 as published by the\n* Free Software Foundation with the addition of the following permission added\n* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK\n* IN WHICH THE COPYRIGHT IS OWNED BY SALESAGILITY, SALESAGILITY DISCLAIMS THE\n* WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.\n*\n* This program is distributed in the hope that it will be useful, but WITHOUT\n* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n* details.\n*\n* You should have received a copy of the GNU Affero General Public License\n* along with this program.  If not, see http://www.gnu.org/licenses.\n*\n* In accordance with Section 7(b) of the GNU Affero General Public License\n* version 3, these Appropriate Legal Notices must retain the display of the\n* \"Supercharged by SuiteCRM\" logo. If the display of the logos is not reasonably\n* feasible for technical reasons, the Appropriate Legal Notices must display\n* the words \"Supercharged by SuiteCRM\".\n*/\n-->\n<!-- Start of main navbar section -->\n\n<div *ngIf=\"(vm$ | async) as vm\" class=\"top-panel fixed-top\">\n\n    <!-- Start of empty navbar section until data is loaded -->\n\n    <ng-template [ngIf]=\"!loaded\">\n        <nav class=\"navbar navbar-expand-lg\">\n            <div class=\"navbar-collapse collapse order-4 order-md-0 collapsenav\">\n                <ul class=\"navbar-nav\">\n                    <li class=\"top-nav nav-item\">&nbsp;\n                    </li>\n                </ul>\n            </div>\n        </nav>\n    </ng-template>\n\n    <!-- End of empty  section until data is loaded -->\n\n    <!-- Start of empty navbar with logo -->\n\n    <ng-container *ngIf=\"loaded\">\n        <ng-container *ngIf=\"!this.isUserLoggedIn\">\n            <nav class=\"navbar ml-0 pl-0\">\n                <div class=\"navbar-collapse\">\n                    <ul class=\"navbar-nav\">\n                        <li class=\"pl-0\">\n                            <scrm-logo-ui></scrm-logo-ui>\n                        </li>\n                    </ul>\n                </div>\n            </nav>\n        </ng-container>\n\n        <!-- End of empty navbar section with logo -->\n\n        <!-- Start of mobile navigation section -->\n\n        <ng-container *ngIf=\"this.isUserLoggedIn && mobileNavbar\">\n            <ul class=\"navbar mobile-nav-block mobilenavbar\">\n                <div class=\"d-flex\">\n                    <button (click)=\"toggleSidebar()\" class=\"navbar-toggler\" type=\"button\">\n                        <scrm-image class=\"responsive-menu-toggler\" image=\"hamburger\"></scrm-image>\n                    </button>\n                    <nav class=\"navbar-expand\" [ngClass]=\"(isSmallScreen() && isSearchBoxVisible()) ? 'd-none' : 'd-block'\">\n                        <ul class=\"navbar-nav h-100\">\n                            <li *ngIf=\"navbar.current && !navbar.current.isGroupedMenu\" class=\"top-nav nav-item dropdown mobile-navbar-active-module h-100 non-grouped\">\n                                <scrm-menu-item [item]=\"navbar.current\"></scrm-menu-item>\n                            </li>\n                            <li *ngIf=\"navbar.current?.submenu  && navbar.current.isGroupedMenu\" class=\"top-nav nav-item dropdown mobile-navbar-active-module main-grouped\">\n                                <scrm-grouped-menu-item\n                                    [item]=\"navbar.current\"\n                                    [subNavCollapse]=\"subNavCollapse\">\n                                </scrm-grouped-menu-item>\n                            </li>\n                        </ul>\n                    </nav>\n                </div>\n\n                <div class=\"d-flex align-items-center\">\n                    <ng-container *ngTemplateOutlet=\"actionIcons\"></ng-container>\n                    <div class=\"global-links action-dropdown\" ngbDropdown>\n                        <li class=\"global-link-item\">\n                            <a #mobileGlobalLinkTitle class=\"nav-link primary-global-link dropdown-toggle\"\n                               ngbDropdownToggle>\n                                <scrm-image class=\"global-action-icon sicon-2x\" image=\"user\"></scrm-image>\n                            </a>\n                            <div [style.min-width.px]=\"mobileGlobalLinkTitle.offsetWidth\"\n                                 aria-labelledby=\"navbarDropdownMenuLink\"\n                                 class=\"dropdown-menu global-links-dropdown border shadow-sm-2\" ngbDropdownMenu>\n                                <span\n                                    class=\"global-user-name\">{{ navbar.currentUser.firstName }} {{ navbar.currentUser.lastName }}</span>\n                                <ng-template [ngIf]=\"navbar.globalActions\">\n                                    <ng-container\n                                        *ngFor=\"let globalAction of navbar.globalActions; let first = first; let last = last;\">\n                                        <a class=\"dropdown-item global-links-sublink\"\n                                           href=\"{{ globalAction.link.url }}\"\n                                           ngbDropdownItem\n                                           target=\"{{ globalAction.link.target }}\">{{ globalAction.link.label }}\n                                        </a>\n                                        <hr *ngIf=\"last === true || first === true\"/>\n                                    </ng-container>\n                                </ng-template>\n                                <scrm-logout-ui></scrm-logout-ui>\n                            </div>\n                        </li>\n                    </div>\n                </div>\n\n            </ul>\n\n        </ng-container>\n\n        <!-- End of mobile navigation section-->\n\n        <!-- Start of navbar section with data once authenticated -->\n\n        <ng-container *ngIf=\"this.isUserLoggedIn && !mobileNavbar\">\n            <nav class=\"navbar navbar-expand-md navbar-1\">\n                <div [ngbCollapse]=\"mainNavCollapse\" class=\"navbar-collapse collapse collapsenav\">\n                        <scrm-home-menu-item\n                            [active]=\"vm.appState.module && vm.appState.module === 'home'\"\n                            [route]=\"getHomePage()\"\n                        ></scrm-home-menu-item>\n\n                        <!-- Navbar with grouped tabs -->\n\n                        <ng-container *ngIf=\"vm.userPreferences['navigation_paradigm'] == 'gm'\">\n\n                            <ul class=\"navbar-nav grouped\">\n\n                                <ng-container *ngIf=\"navbar.current && navbar.current.isGroupedMenu\">\n                                    <li class=\"top-nav nav-item dropdown main-grouped\">\n                                        <scrm-grouped-menu-item\n                                                [item]=\"navbar.current\"\n                                                [subNavCollapse]=\"subNavCollapse\"\n                                                [index]=\"1\"\n                                        >\n                                        </scrm-grouped-menu-item>\n\n                                    </li>\n                                </ng-container>\n\n                                <li *ngIf=\"navbar.current && !navbar.current.isGroupedMenu\" class=\"top-nav nav-item dropdown non-grouped active\">\n                                    <scrm-menu-item [item]=\"navbar.current\" [index]=\"1\"></scrm-menu-item>\n                                </li>\n\n                                <li *ngFor=\"let item of navbar.menu; let i = index;\" class=\"top-nav nav-item dropdown main-grouped\">\n                                    <scrm-grouped-menu-item\n                                        [item]=\"item\"\n                                        [subNavCollapse]=\"subNavCollapse\"\n                                        [index]=\"i+2\"\n                                    >\n                                    </scrm-grouped-menu-item>\n\n                                </li>\n                            </ul>\n\n                            <scrm-menu-items-list [items]=\"navbar.all.modules\"\n                                                  labelKey=\"LBL_TABGROUP_ALL\"\n                                                  [index]=\"navbar.menu.length + 2\">\n                            </scrm-menu-items-list>\n\n                        </ng-container>\n\n\n                        <!-- END Navbar with grouped tabs -->\n\n                        <!-- Navbar with non-grouped tabs -->\n\n                        <ng-container *ngIf=\"vm.userPreferences['navigation_paradigm'] != 'gm'\">\n\n                            <ul class=\"navbar-nav\">\n                                <li *ngIf=\"navbar.current && !navbar.current.isGroupedMenu\" class=\"top-nav nav-item dropdown non-grouped active\">\n                                    <scrm-menu-item [item]=\"navbar.current\" [index]=\"1\"></scrm-menu-item>\n                                </li>\n\n                                <ng-container *ngIf=\"navbar.current?.submenu  && navbar.current.isGroupedMenu\">\n                                    <li class=\"top-nav nav-item dropdown main-grouped\">\n                                        <scrm-grouped-menu-item\n                                            [item]=\"navbar.current\"\n                                            [subNavCollapse]=\"subNavCollapse\"\n                                            [index]=\"1\">\n                                        </scrm-grouped-menu-item>\n                                    </li>\n                                </ng-container>\n\n                                <li *ngFor=\"let item of navbar.menu; let i = index\" class=\"top-nav nav-item dropdown non-grouped\">\n                                    <scrm-menu-item [item]=\"item\" [index]=\"i+2\"></scrm-menu-item>\n                                </li>\n                            </ul>\n\n                        <scrm-menu-items-list [items]=\"navbar.all.modules\"\n                                              labelKey=\"LBL_MORE\"\n                                                [index]=\"navbar.menu.length + 2\">\n                        </scrm-menu-items-list>\n\n                        </ng-container>\n\n                        <!-- END Navbar with non-grouped tabs -->\n\n                </div>\n\n                <ng-container *ngTemplateOutlet=\"actionIcons\"></ng-container>\n\n                <!-- Global Links -->\n\n                <div class=\"global-links action-dropdown\" ngbDropdown>\n                    <ul class=\"navbar-nav\">\n                        <li class=\"global-link-item\">\n                            <a class=\"nav-link primary-global-link\" ngbDropdownToggle>\n                                <scrm-image class=\"global-action-icon sicon-2x\" image=\"user\"></scrm-image>\n                            </a>\n                            <div aria-labelledby=\"navbarDropdownMenuLink\"\n                                 class=\"dropdown-menu global-links-dropdown border shadow-sm-2 dropdown-menu-right\" ngbDropdownMenu>\n                                <span\n                                    class=\"global-user-name\">{{ navbar.currentUser.firstName }} {{ navbar.currentUser.lastName }}</span>\n                                <ng-container *ngIf=\"navbar.globalActions\">\n                                    <ng-container\n                                        *ngFor=\"let globalAction of navbar.globalActions; let first = first; let last = last;\">\n                                        <a class=\"dropdown-item global-links-sublink\"\n                                           href=\"{{ globalAction.link.url }}\"\n                                           ngbDropdownItem\n                                           target=\"{{ globalAction.link.target }}\">{{ globalAction.link.label }}\n                                        </a>\n                                        <hr *ngIf=\"last === true || first === true\"/>\n                                    </ng-container>\n\n                                </ng-container>\n                                <scrm-logout-ui></scrm-logout-ui>\n                            </div>\n                        </li>\n                    </ul>\n                </div>\n\n                <!-- END Global Links -->\n\n            </nav>\n\n            <!-- End of navbar section with data once authenticated -->\n\n        </ng-container>\n    </ng-container>\n\n    <ng-template #actionIcons>\n        <div class=\"action-group navbar-action-group\">\n            <!--Quick Create-->\n            <div class=\"action-new action-dropdown\" ngbDropdown>\n                <ul class=\"navbar-nav border-0\">\n                    <li class=\"global-link-item\">\n                        <a class=\"action-link primary-global-link\" type=\"button\" aria-label=\"Quick Create\" ngbDropdownToggle>\n                            <scrm-image class=\"action-btn-icon\" image=\"plus\"></scrm-image>\n                        </a>\n                        <ul [class.dropdown-menu-right]=\"!mobileNavbar\"\n                            [class.dropdown-menu-right-center]=\"mobileNavbar\"\n                            class=\"dropdown-menu dropdown-menu-left border shadow-sm-2\" ngbDropdownMenu>\n\n                            <ng-container *ngIf=\"(navbar?.current?.module ?? '') && currentQuickActions.length\">\n                                <li class=\"new-list-item-header font-weight-bold\">\n                                    <scrm-label labelKey=\"LBL_MODULE_NAME\" [module]=\"navbar.current.module\"></scrm-label>\n                                </li>\n                                <li class=\"new-list-item\" *ngFor=\"let moduleQuickAction of currentQuickActions\" ngbDropdownItem>\n                                    <ng-container *ngIf=\"!moduleQuickAction.process\">\n                                        <a [routerLink]=\"moduleQuickAction.url\" [queryParams]=\"moduleQuickAction?.params ?? null\" class=\"d-flex align-items-center\">\n                                            <scrm-label [labelKey]=\"moduleQuickAction.labelKey\" [module]=\"navbar.current.module\" class=\"new-list-item-label\"></scrm-label>\n                                        </a>\n                                    </ng-container>\n                                    <ng-container *ngIf=\"moduleQuickAction.process\">\n                                        <a (click)=\"handleProcess(moduleQuickAction)\" class=\"d-flex align-items-center\">\n                                            <scrm-label [labelKey]=\"moduleQuickAction.labelKey\" [module]=\"navbar.current.module\" class=\"new-list-item-label\"></scrm-label>\n                                        </a>\n                                    </ng-container>\n\n                                </li>\n                            </ng-container>\n\n                            <ng-container *ngIf=\"(this?.navigation?.quickActions ?? []).length\">\n                                <li class=\"new-list-item-header font-weight-bold\">\n                                    <scrm-label labelKey=\"LBL_QUICK_ACTIONS\"></scrm-label>\n                                </li>\n                                <li class=\"new-list-item\" *ngFor=\"let quickAction of (this?.navigation?.quickActions ?? [])\" ngbDropdownItem>\n                                    <ng-container *ngIf=\"!quickAction.process\">\n                                        <a [routerLink]=\"quickAction.url\" [queryParams]=\"quickAction?.params ?? null\" class=\"d-flex align-items-center\">\n                                            <scrm-label [labelKey]=\"quickAction.labelKey\" [module]=\"quickAction.module\" class=\"new-list-item-label\"></scrm-label>\n                                        </a>\n                                    </ng-container>\n                                    <ng-container *ngIf=\"quickAction.process\">\n                                        <a (click)=\"handleProcess(quickAction)\" class=\"d-flex align-items-center\">\n                                            <scrm-label [labelKey]=\"quickAction.labelKey\" [module]=\"quickAction.module\" class=\"new-list-item-label\"></scrm-label>\n                                        </a>\n                                    </ng-container>\n                                </li>\n                            </ng-container>\n                        </ul>\n                    </li>\n                </ul>\n            </div>\n            <!--Recently Viewed-->\n            <div class=\"action-history action-dropdown\" ngbDropdown>\n                <ul class=\"navbar-nav border-0\">\n                    <li class=\"global-link-item\">\n                        <a class=\"action-link primary-global-link\" type=\"button\" aria-label=\"Recently Viewed\" ngbDropdownToggle>\n                            <scrm-image class=\"action-btn-icon\" image=\"recently_viewed\"></scrm-image>\n                        </a>\n                        <div class=\"dropdown-menu border shadow-sm-2 dropdown-menu-right scrollbar-thick recently-viewed-nav-header\"\n                             [class.dropdown-menu-right]=\"!mobileNavbar\" ngbDropdownMenu>\n                                 <scrm-recently-viewed [menuItems]=\"recentlyViewed$ | async | slice:0:recentlyViewedCount\"\n                                                       ngbDropdownItem class=\"recently-viewed\"></scrm-recently-viewed>\n                        </div>\n                    </li>\n                </ul>\n            </div>\n\n            <!--Searchbar-->\n            <div class=\"d-flex align-items-center px-1 action-search\">\n                <a class=\"search-mobile-view action-link primary-global-link\" [ngClass]=\"isSearchBoxVisible() ? 'd-none' : 'd-block'\"\n                   type=\"button\" (click)=\"openSearchBox()\" aria-label=\"Search\">\n                    <scrm-image class=\"action-btn-icon\" image=\"search\"></scrm-image>\n                </a>\n\n                <div [ngClass]=\"isSearchBoxVisible() ? 'd-block' : 'd-none'\" [@mobileSearchBarAnm]>\n                    <scrm-search-bar\n                        [labelKey]=\"'LBL_SEARCH'\"\n                        [klass]=\"'search-bar-global'\"\n                        [searchTrigger]=\"'enter'\"\n                        [isMobile]=\"isSmallScreen()\"\n                        (isSearchVisible)=\"closeSearchBox($event)\"\n                        (searchExpression)=\"search($event)\" #searchTerm>\n                    </scrm-search-bar>\n                </div>\n            </div>\n            <!--Notifications-->\n            <div *ngIf=\"notificationsEnabled && checkAppStrings(vm.appStrings) && arePreferencesInitialized(vm.userPreferences)\"\n                 class=\"action-alert action-dropdown\" ngbDropdown #alertDropdown=\"ngbDropdown\">\n                <ul class=\"navbar-nav border-0\">\n                    <li class=\"global-link-item\">\n                        <a class=\"action-link primary-global-link\" type=\"button\"\n                           (mouseenter)=\"markAsRead()\" ngbDropdownToggle>\n                            <scrm-image class=\"action-btn-icon\" image=\"alert\"></scrm-image>\n                        </a>\n                        <ng-container *ngIf=\"(notificationCount$ | async) as notificationCount\">\n                                    <span *ngIf=\"(notificationCount ?? false)\"\n                                          class=\"badge badge-position rounded-pill bg-danger text-white\">\n                                        <ng-container *ngIf=\"notificationCount > 0\">{{notificationCount }}</ng-container>\n                                    </span>\n                        </ng-container>\n                        <div class=\"dropdown-menu border shadow-sm-2 dropdown-menu-right\" aria-labelledby=\"navbarDropdownMenuLink\"\n                             (click)=\"closeNotificationMenu()\" ngbDropdownMenu>\n                            <scrm-notifications></scrm-notifications>\n                        </div>\n                    </li>\n                </ul>\n            </div>\n\n        </div>\n    </ng-template>\n\n</div>\n\n<!-- End of main navbar section -->\n" }]
    }], function () { return [{ type: i1.NavigationStore }, { type: i2.LanguageStore }, { type: i3.UserPreferenceStore }, { type: i4.SystemConfigStore }, { type: i5.AppStateStore }, { type: i6.AuthService }, { type: i7.ModuleNavigation }, { type: i8.ScreenSizeObserverService }, { type: i9.AsyncActionService }, { type: i10.NotificationStore }, { type: i11.GlobalRecentlyViewedStore }, { type: i12.GlobalSearch }, { type: i13.BreakpointObserver }, { type: i14.Router }]; }, { mobileGlobalLinkTitle: [{
            type: ViewChild,
            args: ['mobileGlobalLinkTitle']
        }], searchTermRef: [{
            type: ViewChild,
            args: ['searchTerm', { static: false }]
        }], alertDropdown: [{
            type: ViewChild,
            args: ['alertDropdown']
        }], onResize: [{
            type: HostListener,
            args: ['window:resize', ['$event']]
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 