import { __awaiter, __generator, __read, __spread } from "tslib";
import { AIMSClient, AlActingAccountChangedEvent, AlActingAccountResolvedEvent, AlInsightLocations, AlLocation, AlLocatorService, AlSession, AlSessionEndedEvent, AlSessionStartedEvent, AlSubscriptionGroup, } from '@al/core';
import { Component, NgZone, QueryList, ViewChildren, } from '@angular/core';
import { ConfirmationService, } from 'primeng/api';
import { AlNavigationService } from '../../services/al-navigation.service';
import { AlNavigationContextChanged, } from '../../types/navigation.types';
import { AlTrackingMetricEventName, AlTrackingMetricEventCategory } from '@al/ng-generic-components';
import * as i0 from "@angular/core";
import * as i1 from "../../services/al-navigation.service";
import * as i2 from "primeng/api";
import * as i3 from "@angular/common";
import * as i4 from "primeng/menubar";
import * as i5 from "@ng-select/ng-select";
import * as i6 from "@angular/forms";
import * as i7 from "primeng/inputtext";
import * as i8 from "primeng/tooltip";
import * as i9 from "primeng/progressspinner";
import * as i10 from "primeng/menu";
var _c0 = ["filterInput"];
function AlArchipeligo19AppHeaderComponent_div_2_ng_template_5_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵelement(1, "p-progressSpinner");
    i0.ɵɵelementStart(2, "i");
    i0.ɵɵtext(3, "Loading...");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} }
function AlArchipeligo19AppHeaderComponent_div_2_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    var _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelementStart(1, "input", 14, 15);
    i0.ɵɵlistener("input", function AlArchipeligo19AppHeaderComponent_div_2_ng_template_5_Template_input_input_1_listener($event) { i0.ɵɵrestoreView(_r9); i0.ɵɵnextContext(); var _r1 = i0.ɵɵreference(4); return _r1.filter($event.target.value); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(3, AlArchipeligo19AppHeaderComponent_div_2_ng_template_5_div_3_Template, 4, 0, "div", 16);
} if (rf & 2) {
    var ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r2.loadingManagedAccounts);
} }
function AlArchipeligo19AppHeaderComponent_div_2_ng_template_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 18);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var searchTerm_r10 = ctx.searchTerm;
    var ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("display", ctx_r3.loadingManagedAccounts ? "none" : "block");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" No matches found for \"", searchTerm_r10, "\" ");
} }
function AlArchipeligo19AppHeaderComponent_div_2_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 19);
    i0.ɵɵelementStart(1, "b");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var account_r11 = ctx.item;
    i0.ɵɵpropertyInterpolate("title", account_r11.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("(", account_r11.id, ")");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" - ", account_r11.name, "");
} }
function AlArchipeligo19AppHeaderComponent_div_2_ng_container_10_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 26);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r14 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r14.datacenter.currentRegion, " (US) ");
} }
function AlArchipeligo19AppHeaderComponent_div_2_ng_container_10_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 26);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r15 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r15.datacenter.currentRegion, " (UK) ");
} }
var _c1 = function () { return { "width": "180px" }; };
function AlArchipeligo19AppHeaderComponent_div_2_ng_container_10_Template(rf, ctx) { if (rf & 1) {
    var _r17 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "p-menu", 20, 21);
    i0.ɵɵlistener("onHide", function AlArchipeligo19AppHeaderComponent_div_2_ng_container_10_Template_p_menu_onHide_1_listener() { i0.ɵɵrestoreView(_r17); var ctx_r16 = i0.ɵɵnextContext(2); return ctx_r16.expandedDatacenterMenu = false; })("onShow", function AlArchipeligo19AppHeaderComponent_div_2_ng_container_10_Template_p_menu_onShow_1_listener() { i0.ɵɵrestoreView(_r17); var ctx_r18 = i0.ɵɵnextContext(2); return ctx_r18.expandedDatacenterMenu = true; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 22);
    i0.ɵɵlistener("click", function AlArchipeligo19AppHeaderComponent_div_2_ng_container_10_Template_div_click_3_listener($event) { i0.ɵɵrestoreView(_r17); var _r13 = i0.ɵɵreference(2); return _r13.toggle($event); });
    i0.ɵɵelementStart(4, "div", 23);
    i0.ɵɵtemplate(5, AlArchipeligo19AppHeaderComponent_div_2_ng_container_10_div_5_Template, 2, 1, "div", 24);
    i0.ɵɵtemplate(6, AlArchipeligo19AppHeaderComponent_div_2_ng_container_10_div_6_Template, 2, 1, "div", 24);
    i0.ɵɵelementStart(7, "span");
    i0.ɵɵelement(8, "i", 25);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    var ctx_r5 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵstyleMap(i0.ɵɵpureFunction0(6, _c1));
    i0.ɵɵproperty("model", ctx_r5.datacenter.selectableRegions);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngIf", ctx_r5.datacenter.currentResidency === "US");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r5.datacenter.currentResidency === "EMEA");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngClass", ctx_r5.expandedDatacenterMenu ? "pi pi-caret-up" : "pi pi-caret-down");
} }
function AlArchipeligo19AppHeaderComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    var _r21 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵelement(1, "p-menubar", 4);
    i0.ɵɵelement(2, "span", 5);
    i0.ɵɵelementStart(3, "ng-select", 6, 7);
    i0.ɵɵlistener("ngModelChange", function AlArchipeligo19AppHeaderComponent_div_2_Template_ng_select_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r21); var ctx_r20 = i0.ɵɵnextContext(); return ctx_r20.actingAccountId = $event; })("change", function AlArchipeligo19AppHeaderComponent_div_2_Template_ng_select_change_3_listener() { i0.ɵɵrestoreView(_r21); var ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.onAccountChanged(); })("open", function AlArchipeligo19AppHeaderComponent_div_2_Template_ng_select_open_3_listener() { i0.ɵɵrestoreView(_r21); var ctx_r23 = i0.ɵɵnextContext(); return ctx_r23.onOpenAccountSelector(); });
    i0.ɵɵtemplate(5, AlArchipeligo19AppHeaderComponent_div_2_ng_template_5_Template, 4, 1, "ng-template", 8);
    i0.ɵɵtemplate(6, AlArchipeligo19AppHeaderComponent_div_2_ng_template_6_Template, 2, 3, "ng-template", 9);
    i0.ɵɵtemplate(7, AlArchipeligo19AppHeaderComponent_div_2_ng_template_7_Template, 4, 3, "ng-template", 10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "span", 11);
    i0.ɵɵtext(9, "|");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(10, AlArchipeligo19AppHeaderComponent_div_2_ng_container_10_Template, 9, 7, "ng-container", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    var ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("model", ctx_r0.userMenuItems);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("items", ctx_r0.managedAccounts)("virtualScroll", true)("dropdownPosition", "bottom")("searchable", false)("ngModel", ctx_r0.actingAccountId)("searchFn", ctx_r0.accountSearchFn)("clearable", false);
    i0.ɵɵadvance(7);
    i0.ɵɵproperty("ngIf", ctx_r0.datacenter && ctx_r0.datacenter.locationsAvailable > 0);
} }
var AlArchipeligo19AppHeaderComponent = /** @class */ (function () {
    function AlArchipeligo19AppHeaderComponent(alNavigation, ngZone, confirmationService) {
        var _this = this;
        this.alNavigation = alNavigation;
        this.ngZone = ngZone;
        this.confirmationService = confirmationService;
        this.authenticated = false;
        this.ready = false;
        this.actingAccountName = '';
        this.actingAccount = null;
        this.managedAccounts = [];
        this.loadedManagedAccounts = false;
        this.loadingManagedAccounts = false;
        this.subscriptions = new AlSubscriptionGroup(null);
        this.expandedDatacenterMenu = false;
        this.onSessionEnded = function (event) {
            _this.authenticated = false;
        };
        this.onSessionStart = function (event) {
            _this.authenticated = true;
            _this.userMenuItems[0].label = event.user.name;
        };
        this.onActingAccountChanged = function (event) {
            _this.ready = false;
        };
        this.onActingAccountResolved = function (event) {
            _this.actingAccount = event.actingAccount;
            _this.actingAccountId = event.actingAccount.id;
            if (_this.managedAccounts.length < 2) {
                _this.managedAccounts = [event.actingAccount];
            }
            _this.ready = true;
        };
        this.onNavigationContextChanged = function (event) {
            if (AlSession.isActive()) {
                _this.authenticated = true;
                _this.datacenter = _this.alNavigation.generateDatacenterMenu(AlSession.getActiveDatacenter(), AlSession.getActingAccountAccessibleLocations(), _this.onClickDatacenter);
            }
            else {
                _this.datacenter = undefined;
            }
        };
        this.logout = function () {
            AlSession.deactivateSession();
            _this.alNavigation.navigate.byLocation(AlLocation.AccountsUI, '/#/logout');
        };
        this.onClickDatacenter = function (insightLocationId, $event) {
            var actor = AlLocatorService.getActingNode();
            if (!actor || !AlInsightLocations.hasOwnProperty(insightLocationId)) {
                //  No meat, no eggs, no bacon?  No breakfast for you :(
                return;
            }
            var regionLabel = AlInsightLocations[insightLocationId].logicalRegion;
            _this.confirmationService.confirm({
                key: 'confirmation',
                header: 'Are you sure?',
                message: "You are about to switch regions to " + regionLabel + ".  Are you sure this is what you want to do?",
                acceptLabel: 'Yes, switch now!',
                rejectLabel: 'No thanks',
                accept: function () {
                    var originBaseURI = AlLocatorService.resolveURL(actor.locTypeId);
                    AlSession.setActiveDatacenter(insightLocationId);
                    AlLocatorService.setContext({ insightLocationId: insightLocationId });
                    var targetBaseURI = AlLocatorService.resolveURL(actor.locTypeId);
                    _this.alNavigation.track(AlTrackingMetricEventName.UsageTrackingEvent, {
                        category: AlTrackingMetricEventCategory.GenericConsoleAction,
                        action: 'Data Residency Change',
                        label: insightLocationId
                    });
                    if (targetBaseURI !== originBaseURI) {
                        //  The new domain portal for the changed datacenter is the one we're on.  Emit a notice and redirect.
                        console.log("NOTICE: changing active location to '" + insightLocationId + "' requires change to a new portal at [" + targetBaseURI + "]");
                        _this.alNavigation.navigate.byLocation(actor.locTypeId);
                    }
                    else {
                        //  The new domain portal is the same as the old one.  Route to its base/default route using angular's router.
                        _this.alNavigation.navigate.byNgRoute(['/']);
                    }
                }
            });
        };
        if (AlSession.isActive()) {
            this.loadActiveSession();
        }
    }
    AlArchipeligo19AppHeaderComponent.prototype.loadActiveSession = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, AlSession.ready()];
                    case 1:
                        _a.sent();
                        return [4 /*yield*/, this.alNavigation.ready()];
                    case 2:
                        _a.sent();
                        this.actingAccount = AlSession.getActingAccount();
                        this.actingAccountId = this.actingAccount.id;
                        this.actingAccountName = this.actingAccount.name;
                        this.managedAccounts = [this.actingAccount];
                        this.ready = true;
                        return [2 /*return*/];
                }
            });
        });
    };
    AlArchipeligo19AppHeaderComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.subscriptions.manage([
            AlSession.notifyStream.attach(AlSessionStartedEvent, this.onSessionStart),
            AlSession.notifyStream.attach(AlActingAccountChangedEvent, this.onActingAccountChanged),
            AlSession.notifyStream.attach(AlActingAccountResolvedEvent, this.onActingAccountResolved),
            AlSession.notifyStream.attach(AlSessionEndedEvent, this.onSessionEnded),
            this.alNavigation.events.attach(AlNavigationContextChanged, this.onNavigationContextChanged)
        ]);
        this.actingAccount = AlSession.getActingAccount();
        if (this.actingAccount) {
            this.actingAccountId = this.actingAccount.id;
        }
        this.userMenuItems = [
            {
                label: AlSession.getUserName(),
                items: [
                    {
                        label: 'Logout',
                        icon: 'ui-icon-power-settings-new',
                        command: function () {
                            _this.logout();
                        }
                    }
                ]
            }
        ];
        this.onNavigationContextChanged();
    };
    AlArchipeligo19AppHeaderComponent.prototype.ngOnDestroy = function () {
        this.subscriptions.cancelAll();
    };
    AlArchipeligo19AppHeaderComponent.prototype.onAccountChanged = function () {
        this.alNavigation.setActingAccount(this.actingAccountId);
    };
    AlArchipeligo19AppHeaderComponent.prototype.accountSearchFn = function (term, account) {
        term = term.toLocaleLowerCase();
        return account.name.toLocaleLowerCase().indexOf(term) > -1 || account.id.startsWith(term);
    };
    AlArchipeligo19AppHeaderComponent.prototype.onOpenAccountSelector = function () {
        var _this = this;
        if (!this.loadedManagedAccounts) {
            this.loadingManagedAccounts = true;
            this.managedAccounts = [];
            AIMSClient.getAccountsByRelationship(AlSession.getPrimaryAccountId(), "managed", { active: true }).then(function (managedAccounts) {
                _this.managedAccounts = __spread([AlSession.getPrimaryAccount()], managedAccounts).sort(function (a, b) { return a.name.toUpperCase().localeCompare(b.name.toUpperCase()); });
                _this.loadedManagedAccounts = true;
                _this.loadingManagedAccounts = false;
            });
            this.filterInput.changes.subscribe(function (res) {
                if (_this.filterInput.first) {
                    _this.filterInput.first.nativeElement.focus();
                }
            });
        }
    };
    AlArchipeligo19AppHeaderComponent.prototype.redirectToDashboards = function () {
        this.alNavigation.navigate.byNamedRoute("cd19:dashboards");
    };
    /** @nocollapse */ AlArchipeligo19AppHeaderComponent.ɵfac = function AlArchipeligo19AppHeaderComponent_Factory(t) { return new (t || AlArchipeligo19AppHeaderComponent)(i0.ɵɵdirectiveInject(i1.AlNavigationService), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i2.ConfirmationService)); };
    /** @nocollapse */ AlArchipeligo19AppHeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AlArchipeligo19AppHeaderComponent, selectors: [["al-archipeligo19-app-header"]], viewQuery: function AlArchipeligo19AppHeaderComponent_Query(rf, ctx) { if (rf & 1) {
            i0.ɵɵviewQuery(_c0, true);
        } if (rf & 2) {
            var _t;
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filterInput = _t);
        } }, decls: 3, vars: 1, consts: [[1, "user-info-summary"], [1, "al-header-logo", 3, "click"], ["class", "user-menus-container", 4, "ngIf"], [1, "user-menus-container"], ["styleClass", "app-user-menu", 3, "model"], [1, "user-selected-separator"], ["bindLabel", "name", "bindValue", "id", 1, "al-account-selector", 3, "items", "virtualScroll", "dropdownPosition", "searchable", "ngModel", "searchFn", "clearable", "ngModelChange", "change", "open"], ["accountSelector", ""], ["ng-header-tmp", ""], ["ng-notfound-tmp", ""], ["ng-option-tmp", ""], [1, "separator"], [4, "ngIf"], [2, "display", "flex"], ["pInputText", "", "type", "text", "placeholder", "Search by account id or name...", 1, "filter-input", 3, "input"], ["filterInput", ""], ["pTooltip", "Loading", "id", "accounts-loading-indicator", 4, "ngIf"], ["pTooltip", "Loading", "id", "accounts-loading-indicator"], [1, "ng-option", "disabled"], [1, "account-selector-option", 3, "title"], ["popup", "popup", 1, "region-menu", 3, "model", "onHide", "onShow"], ["menux", ""], [1, "menu-trigger", 3, "click"], [1, "account-icon-space"], ["class", "dco-flag", 4, "ngIf"], [3, "ngClass"], [1, "dco-flag"]], template: function AlArchipeligo19AppHeaderComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵelementStart(1, "div", 1);
            i0.ɵɵlistener("click", function AlArchipeligo19AppHeaderComponent_Template_div_click_1_listener() { return ctx.redirectToDashboards(); });
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(2, AlArchipeligo19AppHeaderComponent_div_2_Template, 11, 9, "div", 2);
            i0.ɵɵelementEnd();
        } if (rf & 2) {
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", ctx.authenticated && ctx.ready);
        } }, directives: [i3.NgIf, i4.Menubar, i5.NgSelectComponent, i6.NgControlStatus, i6.NgModel, i5.ɵj, i5.ɵl, i5.ɵf, i7.InputText, i8.Tooltip, i9.ProgressSpinner, i10.Menu, i3.NgClass], styles: [".user-info-summary[_ngcontent-%COMP%]{height:40px;background:#3c3c3c;display:flex;align-items:center;justify-content:space-between;padding-left:24px;padding-right:24px;font-size:12px}.user-info-summary[_ngcontent-%COMP%]   .user-menus-container[_ngcontent-%COMP%]{display:flex;align-items:center}.user-info-summary[_ngcontent-%COMP%]   .user-menus-container[_ngcontent-%COMP%]   .user-selected-separator[_ngcontent-%COMP%]{background:#dcdcdc;width:7px;height:12px;margin-top:2px}  .ui-menubar.ui-widget.ui-widget-content.ui-corner-all{background-color:#3c3c3c;color:#fff;border:none}  .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-submenu-icon{background-color:#3c3c3c;color:#fff}  .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-submenu-icon:before{content:\"arrow_drop_down\";display:inline-block;font-family:'Material Icons';font-size:inherit}  .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menuitem-active .ui-submenu-icon::before{transform:rotate(180deg)}  .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-submenu>ul{border-top:2px solid #57a0d7;box-shadow:0 2px 4px #0000007F}  .app-user-menu.ui-menubar .ui-menubar-root-list>.ui-menuitem>.ui-menuitem-link{padding-right:0;color:#fff}  .app-user-menu.ui-menubar .ui-menubar-root-list>.ui-menuitem>.ui-menuitem-link:hover{background-color:#3c3c3c;color:#cbcbcb}  .app-user-menu.ui-menubar .ui-menubar-root-list>.ui-menuitem.ui-menuitem-active>.ui-menuitem-link{background-color:#3c3c3c}  .ui-menubar .ui-menuitem-link{color:unset}  .separator{color:#fff}  .ng-clear-wrapper{display:none}  ng-select.ng-select{padding-bottom:0}  .ng-select .ng-arrow-wrapper .ng-arrow{display:none!important}  .ng-select span.ng-arrow-wrapper:before{content:\"arrow_drop_down\";display:inline-block;font-family:'Material Icons';text-rendering:auto;font-weight:400;font-style:normal;font-size:24px;margin-top:5px}  .ng-select.ng-select-opened>.ng-select-container span.ng-arrow-wrapper:before{transform:rotate(180deg)}  .ng-select-opened .ng-select span.ng-arrow-wrapper{transform:rotate(180deg)}  .ng-select.ng-select-focused:not(.ng-select-opened)>.ng-select-container{border:none;box-shadow:none}  .ng-select{padding-bottom:unset}  .ng-select .ng-select-container::after{border-bottom:0}  .ng-select .ng-select-container .ng-value-container{padding-left:10px!important;align-items:center!important}  .filter-input{width:100%}  .ui-inputtext{padding-left:5px;padding-bottom:4px}  .ui-inputtext .ui-inputtext.ui-state-focus{background-size:100% 1px,100% 1px;padding-bottom:4px}  .ui-inputtext:focus{background-size:100% 1px,100% 1px;padding-bottom:4px}.al-account-selector[_ngcontent-%COMP%]     .ng-select-container{background-color:unset;color:#fff;border:none;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.al-account-selector[_ngcontent-%COMP%]     .ng-select-container:hover{color:#cbcbcb;cursor:pointer}.al-account-selector[_ngcontent-%COMP%]     .ng-select.ng-select-opened>.ng-select-container{background-color:unset}.al-account-selector[_ngcontent-%COMP%]     .ng-select.ng-select-focused:not(.ng-select-opened)>.ng-select-container{border:none;box-shadow:none}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel{margin-left:4px;top:36px;width:300px;background-color:#fff;border-top:2px solid #57a0d7;box-shadow:0 2px 4px #0000007F;border-radius:0 0 2px 2px;right:0;left:unset}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel .ng-dropdown-header{border-bottom:1px solid #ededed;padding:12px}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel .ng-select-bottom{top:100%;border-bottom-right-radius:4px;border-bottom-left-radius:4px;border-top-color:#e6e6e6;margin-top:-1px}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option{color:#3c3c3c;padding:12px;line-height:unset}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option.ng-option-marked{background-color:#ededed}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option.ng-option-selected{background-color:#57a0d7;color:#fff}.al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option .account-selector-option{width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.al-header-logo[_ngcontent-%COMP%]{background:url(\"data:image/svg+xml,%3Csvg width%3D%2219%22 height%3D%2221%22 viewBox%3D%220 0 19 21%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath d%3D%22M11.5703 4.49572C12.6508 3.14611 12.2886 1.08846 11.0129 0.307763C9.89213 -0.377426 8.19186 -0.00161005 7.20188 2.28235C6.97249 2.8222 6.43323 4.64314 5.88392 6.66548C5.44325 7.91128 4.47541 10.3427 3.69268 11.5802C3.65031 11.6468 3.61201 11.7162 3.57799 11.7878C1.99644 14.1714 0.50543 16.5634 0.257935 17.2402C-0.34571 18.8785 0.125133 20.3049 1.51352 20.8468C2.9019 21.3887 4.71083 20.4087 5.03076 18.6854C5.23198 17.6368 5.18771 15.5999 5.61429 13.0045C5.85977 11.9124 6.55396 9.36264 8.19588 7.64966C9.35488 6.49107 10.3529 6.00936 11.5662 4.49364L11.5703 4.49572ZM17.7174 16.2311C16.8703 14.1922 9.61445 4.35868 10.9887 7.47318C13.9687 14.1839 12.4757 14.9625 13.186 18.5774C13.5301 20.3257 15.3109 21.3223 16.7013 20.7617C17.9186 20.2675 18.6893 18.5774 17.7194 16.2332L17.7174 16.2311Z%22 fill%3D%22white%22%2F%3E%3Cpath d%3D%22M11.8079 13.2592C11.8095 13.7743 11.663 14.2783 11.387 14.7074C11.111 15.1365 10.7178 15.4715 10.2572 15.6701C9.79666 15.8686 9.28938 15.9217 8.79955 15.8227C8.30973 15.7237 7.85937 15.477 7.50544 15.1138C7.15152 14.7506 6.90993 14.2873 6.81123 13.7824C6.71254 13.2775 6.76117 12.7537 6.95099 12.2774C7.1408 11.801 7.46326 11.3935 7.87759 11.1062C8.29191 10.819 8.77947 10.6651 9.27861 10.6638C9.9473 10.6627 10.5891 10.9353 11.0633 11.4219C11.5374 11.9085 11.8052 12.5692 11.8079 13.2592Z%22 fill%3D%22%23FE6116%22%2F%3E%3C%2Fsvg%3E\") center no-repeat;width:25px;height:39px;min-height:39px;cursor:pointer}[_nghost-%COMP%]     .ng-select.ng-select-single .ng-select-container .ng-arrow-wrapper{bottom:5px}[_nghost-%COMP%]     p-menu .ui-menu{padding:8px 0;border-top:2px solid #57a0d7;box-shadow:0 2px 4px #0000007F;top:40px!important}[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem{text-transform:uppercase}[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem.active{background-color:#57a0d7;pointer-events:none;font-weight:700}[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem.active>a{color:#fff}[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem .ui-menuitem-link{padding-left:24px}[_nghost-%COMP%]     p-menu .ui-menu li{display:flex;align-items:center;padding-left:16px}[_nghost-%COMP%]     p-menu .ui-menu li a:hover{background-color:inherit;color:inherit}[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem:hover{background-color:#ededed;color:#000}[_nghost-%COMP%]     p-menu .ui-menu .ui-submenu-header{color:#a8a8a8;background-color:#fff;font-size:12px}[_nghost-%COMP%]     .menu-trigger .account-icon-space{color:#fff;text-transform:uppercase;padding-left:10px;display:flex;padding-top:10px}[_nghost-%COMP%]     .menu-trigger .account-icon-space:hover{color:#cbcbcb;cursor:pointer}[_nghost-%COMP%]     .menu-trigger .account-icon-space .pi-angle-down, [_nghost-%COMP%]     .menu-trigger .account-icon-space .pi-angle-up{font-size:14px;margin-top:3px;margin-left:5px}[_nghost-%COMP%]     #accounts-loading-indicator .ui-progress-spinner{position:relative;top:4px;width:20px;height:18px;display:inline-block;margin-right:6px}.darkMode[_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%], .darkMode   [_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%]{background-color:#212121}.darkMode[_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%]   .app-user-menu[_ngcontent-%COMP%], .darkMode   [_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%]   .app-user-menu[_ngcontent-%COMP%]{background-color:#212121}.darkMode[_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all, .darkMode   [_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all{background-color:#212121}.darkMode[_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a, .darkMode   [_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a{background-color:#212121}.darkMode[_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a .ui-submenu-icon, .darkMode   [_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a .ui-submenu-icon{background-color:#212121}.darkMode[_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a:hover, .darkMode   [_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a:hover{background-color:#212121}.darkMode[_nghost-%COMP%]     .ui-submenu-list, .darkMode   [_nghost-%COMP%]     .ui-submenu-list{background-color:#3c3c3c}.darkMode[_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link, .darkMode   [_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link{background-color:#3c3c3c;color:#fff}.darkMode[_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link .ui-menuitem-icon, .darkMode   [_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link .ui-menuitem-icon{color:#fff}.darkMode[_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link:hover, .darkMode   [_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link:hover{background-color:#535353;color:#fff}.darkMode[_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel, .darkMode   [_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel{background-color:#3c3c3c}.darkMode[_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel .filter-input, .darkMode   [_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel .filter-input{color:#fff}.darkMode[_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option, .darkMode   [_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option{color:#fff}.darkMode[_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option.ng-option-marked:not(.ng-option-selected), .darkMode   [_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option.ng-option-marked:not(.ng-option-selected){background-color:#535353}.darkMode[_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option .account-selector-option, .darkMode   [_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option .account-selector-option{width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.darkMode[_nghost-%COMP%]     p-menu .ui-menu, .darkMode   [_nghost-%COMP%]     p-menu .ui-menu{background-color:#3c3c3c}.darkMode[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem, .darkMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem{background-color:#3c3c3c}.darkMode[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem .ui-menuitem-link, .darkMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem .ui-menuitem-link{color:#fff}.darkMode[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem .ui-menuitem-link:hover, .darkMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem .ui-menuitem-link:hover{background-color:#535353}.darkMode[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem:hover, .darkMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem:hover{background-color:#535353}.darkMode[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem.active, .darkMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem.active{background-color:#57a0d7}.darkMode[_nghost-%COMP%]     p-menu .ui-menu .ui-submenu-header, .darkMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-submenu-header{background-color:#3c3c3c;color:#fff}.blueMode[_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%], .blueMode   [_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%]{background-color:#1e2b38}.blueMode[_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%]   .app-user-menu[_ngcontent-%COMP%], .blueMode   [_nghost-%COMP%]   .user-info-summary[_ngcontent-%COMP%]   .app-user-menu[_ngcontent-%COMP%]{background-color:#1e2b38}.blueMode[_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all, .blueMode   [_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all{background-color:#1e2b38}.blueMode[_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a, .blueMode   [_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a{background-color:#1e2b38}.blueMode[_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a .ui-submenu-icon, .blueMode   [_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a .ui-submenu-icon{background-color:#1e2b38}.blueMode[_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a:hover, .blueMode   [_nghost-%COMP%]     .ui-menubar.ui-widget.ui-widget-content.ui-corner-all .ui-menubar-root-list>li>a:hover{background-color:#1e2b38}.blueMode[_nghost-%COMP%]     .ui-submenu-list, .blueMode   [_nghost-%COMP%]     .ui-submenu-list{background-color:#1e2b38}.blueMode[_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link, .blueMode   [_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link{background-color:#1e2b38;color:#fff}.blueMode[_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link .ui-menuitem-icon, .blueMode   [_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link .ui-menuitem-icon{color:#fff}.blueMode[_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link:hover, .blueMode   [_nghost-%COMP%]     .ui-submenu-list .ui-menuitem-link:hover{background-color:#324153;color:#fff}.blueMode[_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel, .blueMode   [_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel{background-color:#1e2b38}.blueMode[_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel .filter-input, .blueMode   [_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel .filter-input{color:#fff}.blueMode[_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option, .blueMode   [_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option{color:#fff}.blueMode[_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option.ng-option-marked:not(.ng-option-selected), .blueMode   [_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option.ng-option-marked:not(.ng-option-selected){background-color:#324153}.blueMode[_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option .account-selector-option, .blueMode   [_nghost-%COMP%]   .al-account-selector[_ngcontent-%COMP%]     .ng-dropdown-panel-items .ng-option .account-selector-option{width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.blueMode[_nghost-%COMP%]     p-menu .ui-menu, .blueMode   [_nghost-%COMP%]     p-menu .ui-menu{background-color:#1e2b38}.blueMode[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem, .blueMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem{background-color:#1e2b38}.blueMode[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem .ui-menuitem-link, .blueMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem .ui-menuitem-link{color:#fff}.blueMode[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem .ui-menuitem-link:hover, .blueMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem .ui-menuitem-link:hover{background-color:#324153}.blueMode[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem:hover, .blueMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem:hover{background-color:#324153}.blueMode[_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem.active, .blueMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-menuitem.active{background-color:#57a0d7}.blueMode[_nghost-%COMP%]     p-menu .ui-menu .ui-submenu-header, .blueMode   [_nghost-%COMP%]     p-menu .ui-menu .ui-submenu-header{background-color:#1e2b38;color:#fff}"] });
    return AlArchipeligo19AppHeaderComponent;
}());
export { AlArchipeligo19AppHeaderComponent };
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(AlArchipeligo19AppHeaderComponent, [{
        type: Component,
        args: [{
                selector: 'al-archipeligo19-app-header',
                templateUrl: './al-archipeligo19-app-header.component.html',
                styleUrls: ['./al-archipeligo19-app-header.component.scss']
            }]
    }], function () { return [{ type: i1.AlNavigationService }, { type: i0.NgZone }, { type: i2.ConfirmationService }]; }, { filterInput: [{
            type: ViewChildren,
            args: ['filterInput']
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 