import { __decorate } from "tslib";
import { ChangeDetectionStrategy, Component, ContentChildren, Input } from '@angular/core';
import { Select } from '@ngxs/store';
import { UntilDestroy } from '@ngneat/until-destroy';
import { PrimeTemplate } from 'primeng/api';
import { LayoutUiSelectors } from '../../../../../../state/ui/layout/layout.selectors';
import { UiAthenaActions } from '../../state/ui-layout.actions';
import { UiAthenaSelectors } from '../../state/ui-layout.selectors';
import { MenuType } from '../../../../core/models/menu-types';
import { GlobalInjector } from '../../../../../../common/services/global-injector';
import * as i0 from "@angular/core";
import * as i1 from "@ngxs/store";
import * as i2 from "@angular/common";
import * as i3 from "@angular/router";
import * as i4 from "primeng/api";
import * as i5 from "../topbar-actions/topbar-actions.component";
import * as i6 from "../../../../../smz-responsive/smz-responsive.component";
let NewAthenaTopbarComponent = class NewAthenaTopbarComponent {
    constructor(store) {
        this.store = store;
        this.horizontalMenuType = MenuType.HORIZONTAL;
        this.uiConfig = GlobalInjector.config;
    }
    ngAfterContentInit() {
        this.templates.forEach((item) => {
            switch (item.getType()) {
                case 'headerExtrasLandscape':
                    this.headerLandscapeTemplate = item.template;
                    break;
                case 'headerExtrasPortrait':
                    this.headerPortraitTemplate = item.template;
                    break;
            }
        });
    }
    show() {
        this.store.dispatch(new UiAthenaActions.ShowSidebar);
    }
    hide() {
        this.store.dispatch(new UiAthenaActions.HideSidebar);
    }
    toggle() {
        this.store.dispatch(new UiAthenaActions.ToggleSidebar);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: NewAthenaTopbarComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: NewAthenaTopbarComponent, selector: "smz-ui-new-athena-topbar", inputs: { notifications: "notifications", profile: "profile" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: "<ng-container *ngIf=\"layout$ | async as layout\">\r\n<smz-responsive class=\"grid grid-nogutter w-full items-center justify-start\">\r\n\r\n    <!-- LANDSCAPE -->\r\n    <ng-template pTemplate=\"landscape\">\r\n\r\n        <div class=\"topbar clearfix\">\r\n\r\n            <div class=\"w-full h-full grid grid-nogutter items-center justify-start flex-nowrap\" smz-ui-new-athena-topbar-actions [headerExtrasTemplate]=\"headerLandscapeTemplate\" [profile]=\"profile\" [notifications]=\"notifications\">\r\n\r\n                <a class=\"topbar-logo\">\r\n                    <ng-container *ngIf=\"(appLogo$ | async) as appLogo\">\r\n                        <img routerlink=\"/\" [src]=\"appLogo.horizontal\" [routerLink]=\"uiConfig.rbkUtils.authentication.authenticatedRoot\"\r\n                            [ngClass]=\"{ 'logo': !layout.enlargeTopbarLogo, 'enlarged-logo': layout.enlargeTopbarLogo }\"\r\n                            class=\"cursor-pointer outline-none\" tabindex=\"0\"\r\n                        >\r\n                    </ng-container>\r\n                </a>\r\n\r\n                <a *ngIf=\"!layout.hideResponsiveMenuButton\" id=\"menu-button\" class=\"clickable\" (click)=\"toggle()\">\r\n                    <i class=\"pi pi-align-left\"></i>\r\n                </a>\r\n\r\n            </div>\r\n\r\n        </div>\r\n\r\n    </ng-template>\r\n\r\n    <!-- PORTRAIT -->\r\n    <ng-template pTemplate=\"portrait\">\r\n\r\n        <div class=\"topbar clearfix\">\r\n\r\n            <div class=\"w-full h-full grid grid-nogutter items-center justify-start flex-nowrap\" smz-ui-new-athena-topbar-actions [headerExtrasTemplate]=\"headerPortraitTemplate\" [profile]=\"profile\" [notifications]=\"notifications\">\r\n\r\n                <a class=\"topbar-logo max-w-[100px]\">\r\n                    <ng-container *ngIf=\"(appLogo$ | async) as appLogo\">\r\n                        <img routerlink=\"/\" [src]=\"appLogo.horizontal\" [routerLink]=\"uiConfig.rbkUtils.authentication.authenticatedRoot\"\r\n                            class=\"w-full h-full cursor-pointer outline-none\" tabindex=\"0\"\r\n                        >\r\n                    </ng-container>\r\n                </a>\r\n\r\n                <a *ngIf=\"!layout.hideResponsiveMenuButton\" id=\"menu-button\" class=\"clickable\" (click)=\"toggle()\">\r\n                    <i class=\"pi pi-align-left\"></i>\r\n                </a>\r\n\r\n            </div>\r\n\r\n        </div>\r\n\r\n    </ng-template>\r\n\r\n</smz-responsive>\r\n\r\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.AthenaTopbarActionsComponent, selector: "[smz-ui-new-athena-topbar-actions]", inputs: ["profile", "notifications", "headerExtrasTemplate"] }, { kind: "component", type: i6.SmzResponsiveComponent, selector: "smz-responsive" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
};
__decorate([
    Select(LayoutUiSelectors.topbarTitle)
], NewAthenaTopbarComponent.prototype, "topbarTitle$", void 0);
__decorate([
    Select(LayoutUiSelectors.appContentLogo)
], NewAthenaTopbarComponent.prototype, "appLogo$", void 0);
__decorate([
    Select(UiAthenaSelectors.layout)
], NewAthenaTopbarComponent.prototype, "layout$", void 0);
NewAthenaTopbarComponent = __decorate([
    UntilDestroy()
], NewAthenaTopbarComponent);
export { NewAthenaTopbarComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: NewAthenaTopbarComponent, decorators: [{
            type: Component,
            args: [{ selector: 'smz-ui-new-athena-topbar', changeDetection: ChangeDetectionStrategy.Default, template: "<ng-container *ngIf=\"layout$ | async as layout\">\r\n<smz-responsive class=\"grid grid-nogutter w-full items-center justify-start\">\r\n\r\n    <!-- LANDSCAPE -->\r\n    <ng-template pTemplate=\"landscape\">\r\n\r\n        <div class=\"topbar clearfix\">\r\n\r\n            <div class=\"w-full h-full grid grid-nogutter items-center justify-start flex-nowrap\" smz-ui-new-athena-topbar-actions [headerExtrasTemplate]=\"headerLandscapeTemplate\" [profile]=\"profile\" [notifications]=\"notifications\">\r\n\r\n                <a class=\"topbar-logo\">\r\n                    <ng-container *ngIf=\"(appLogo$ | async) as appLogo\">\r\n                        <img routerlink=\"/\" [src]=\"appLogo.horizontal\" [routerLink]=\"uiConfig.rbkUtils.authentication.authenticatedRoot\"\r\n                            [ngClass]=\"{ 'logo': !layout.enlargeTopbarLogo, 'enlarged-logo': layout.enlargeTopbarLogo }\"\r\n                            class=\"cursor-pointer outline-none\" tabindex=\"0\"\r\n                        >\r\n                    </ng-container>\r\n                </a>\r\n\r\n                <a *ngIf=\"!layout.hideResponsiveMenuButton\" id=\"menu-button\" class=\"clickable\" (click)=\"toggle()\">\r\n                    <i class=\"pi pi-align-left\"></i>\r\n                </a>\r\n\r\n            </div>\r\n\r\n        </div>\r\n\r\n    </ng-template>\r\n\r\n    <!-- PORTRAIT -->\r\n    <ng-template pTemplate=\"portrait\">\r\n\r\n        <div class=\"topbar clearfix\">\r\n\r\n            <div class=\"w-full h-full grid grid-nogutter items-center justify-start flex-nowrap\" smz-ui-new-athena-topbar-actions [headerExtrasTemplate]=\"headerPortraitTemplate\" [profile]=\"profile\" [notifications]=\"notifications\">\r\n\r\n                <a class=\"topbar-logo max-w-[100px]\">\r\n                    <ng-container *ngIf=\"(appLogo$ | async) as appLogo\">\r\n                        <img routerlink=\"/\" [src]=\"appLogo.horizontal\" [routerLink]=\"uiConfig.rbkUtils.authentication.authenticatedRoot\"\r\n                            class=\"w-full h-full cursor-pointer outline-none\" tabindex=\"0\"\r\n                        >\r\n                    </ng-container>\r\n                </a>\r\n\r\n                <a *ngIf=\"!layout.hideResponsiveMenuButton\" id=\"menu-button\" class=\"clickable\" (click)=\"toggle()\">\r\n                    <i class=\"pi pi-align-left\"></i>\r\n                </a>\r\n\r\n            </div>\r\n\r\n        </div>\r\n\r\n    </ng-template>\r\n\r\n</smz-responsive>\r\n\r\n</ng-container>" }]
        }], ctorParameters: () => [{ type: i1.Store }], propDecorators: { templates: [{
                type: ContentChildren,
                args: [PrimeTemplate]
            }], topbarTitle$: [], appLogo$: [], layout$: [], notifications: [{
                type: Input
            }], profile: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 