import { Component, Input } from '@angular/core';
import { SideBarGenericContent, SideBarGenericContentComponent } from '../side-bar/side-bar-generic-content/side-bar-generic-content.component';
import * as i0 from "@angular/core";
import * as i1 from "../../@services/eagna.service";
import * as i2 from "@angular/platform-browser";
import * as i3 from "@angular/common";
import * as i4 from "@angular/router";
import * as i5 from "@angular/material/button";
import * as i6 from "@angular/material/icon";
import * as i7 from "@angular/material/toolbar";
import * as i8 from "@angular/material/badge";
export class HeaderComponent {
    constructor(_eagnaListner, _h) {
        this._eagnaListner = _eagnaListner;
        this._h = _h;
        this.settings = { name: "" };
    }
    ngOnInit() {
        if (!this.settings.rightIcons) {
            this.settings.treeSideBar = { enabled: true, opened: true };
        }
        if (!this.settings.rightIcons) {
            this.settings.rightIcons = { apps: true, contacts: true, notif: true, user: true };
        }
        if (this.settings.name) {
            this._h.setTitle(this.settings.name);
        }
    }
    toggleNotification() {
        this._eagnaListner.sideBarComponentLoader$.emit({
            className: SideBarGenericContentComponent,
            data: new SideBarGenericContent("Notification sideBar header", { matesContent: 'Notification contents go here' }),
            sideBarId: "app-home"
        });
    }
    toggleContacts() {
        this._eagnaListner.sideBarComponentLoader$.emit({
            className: SideBarGenericContentComponent,
            data: new SideBarGenericContent("Contacts sideBar header", { matesContent: 'Contacts contents go here' }),
            sideBarId: "app-home"
        });
    }
}
HeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: HeaderComponent, deps: [{ token: i1.EagnaListener }, { token: i2.Title }], target: i0.ɵɵFactoryTarget.Component });
HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: HeaderComponent, selector: "eagna-header", inputs: { settings: "settings" }, ngImport: i0, template: "<mat-toolbar class=\"full-width\"> <!-- *ngIf=\"settings\" [ngStyle]=\"{'box-shadow': (isVisible && currentDirection.y > 0 && !settings.disableBorderBottom ? '0 1px 6px 0 rgba(32, 33, 36, 0.28)' : 'none'),'width': (settings.minWidth? settings.widthCalc() : '100%'), 'height': settings.height}\" class=\"header-wrapper\" [ngClass]=\"{'eagna-sticky': settings.style=='sticky', 'bg-preprod' : (environment.production||false) == false}\" [color]=\"tbApperance\" -->\n    <mat-toolbar-row class=\"main-header\" style=\"height: inherit\">\n      <button *ngIf=\"settings.treeSideBar && settings.treeSideBar.enabled\" mat-icon-button class=\"sidebar-toggle\" (click)=\"settings.treeSideBar.opened = !settings.treeSideBar.opened\">\n        <mat-icon>menu</mat-icon>\n      </button>\n  \n      <span class=\"{{settings.logo?.class}}\" style=\"width: 25px;height: 25px;\"\n        *ngIf=\"settings.logo != null && settings.logo?.status\"></span>\n        <a [routerLink]=\"settings.homeLink\" class=\"font-condensed bold font-rr-primary\"\n          style=\"text-decoration: none;\">{{settings.name}}</a>\n  \n        <!-- <ng-container *ngIf=\"states.length > 0\">\n          <span class=\"p-x-4\">&nbsp;</span>\n            <a class=\"cursor-pointer font-condensed font-rr-secondary text-transform-uppercase fw-600\" [matMenuTriggerFor]=\"menu\">{{selectedState.name}} <mat-icon class=\"font-rr-black\">arrow_drop_down</mat-icon></a>\n            <mat-menu #menu=\"matMenu\">\n              <button mat-menu-item (click)=\"changeState(s)\" [value]=\"s.name\" *ngFor=\"let s of states\">{{s.name}}</button>\n            </mat-menu>\n  \n        </ng-container> -->\n      \n        <span class=\"main-header-content\"> <!-- [ngStyle]=\"headerContentStyle\" -->\n            <!-- <eagna-tabs *ngIf=\"tabsData && tabsData.length>0\" [tabType]=\"'route'\" [(tabsData)]=\"tabsData\" style=\"width:auto;\"\n                [noRouterOutlet]=\"true\"></eagna-tabs> -->\n          <div class=\"toolbar-container\">\n            <ng-content>\n\n            </ng-content>\n          </div>\n        </span>\n        <!-- <eagna-userbar *ngIf=\"userbar == true\" style=\"position:absolute; right:0;top:0;\"></eagna-userbar> -->\n        <span class=\"spacer\"></span>\n        <button *ngIf=\"settings.rightIcons?.notif\" mat-icon-button aria-label=\"Notifications\" (click)=\"toggleNotification()\">\n          <mat-icon matBadge=\"99\" matBadgeSize=\"small\" matBadgeColor=\"primary\" class=\"badge-large\">notifications\n          </mat-icon>\n        </button>\n  \n        <button *ngIf=\"settings.rightIcons?.apps\" mat-icon-button aria-label=\"Apps\"> <!-- [matMenuTriggerFor]=\"appMenu\" -->\n          <mat-icon>apps</mat-icon>\n        </button>\n        <!-- app-menu-starts here -->\n        <!-- app-menu-ends here -->\n        <button *ngIf=\"settings.rightIcons?.contacts\" mat-icon-button aria-label=\"Contacts\" (click)=\"toggleContacts()\" class=\"toolbar-btn\">\n          <mat-icon>contacts</mat-icon>\n        </button>\n\n      </mat-toolbar-row>\n      <!-- <mat-toolbar-row class=\"sub-header\" *ngIf=\"settings.secondRow && settings.secondRow.status\"></mat-toolbar-row> -->\n    </mat-toolbar>", styles: [".mat-toolbar-multiple-rows{min-height:40px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button],             button[mat-fab], button[mat-mini-fab], button[mat-stroked-button],             button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i7.MatToolbarRow, selector: "mat-toolbar-row", exportAs: ["matToolbarRow"] }, { kind: "directive", type: i8.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: HeaderComponent, decorators: [{
            type: Component,
            args: [{ selector: 'eagna-header', template: "<mat-toolbar class=\"full-width\"> <!-- *ngIf=\"settings\" [ngStyle]=\"{'box-shadow': (isVisible && currentDirection.y > 0 && !settings.disableBorderBottom ? '0 1px 6px 0 rgba(32, 33, 36, 0.28)' : 'none'),'width': (settings.minWidth? settings.widthCalc() : '100%'), 'height': settings.height}\" class=\"header-wrapper\" [ngClass]=\"{'eagna-sticky': settings.style=='sticky', 'bg-preprod' : (environment.production||false) == false}\" [color]=\"tbApperance\" -->\n    <mat-toolbar-row class=\"main-header\" style=\"height: inherit\">\n      <button *ngIf=\"settings.treeSideBar && settings.treeSideBar.enabled\" mat-icon-button class=\"sidebar-toggle\" (click)=\"settings.treeSideBar.opened = !settings.treeSideBar.opened\">\n        <mat-icon>menu</mat-icon>\n      </button>\n  \n      <span class=\"{{settings.logo?.class}}\" style=\"width: 25px;height: 25px;\"\n        *ngIf=\"settings.logo != null && settings.logo?.status\"></span>\n        <a [routerLink]=\"settings.homeLink\" class=\"font-condensed bold font-rr-primary\"\n          style=\"text-decoration: none;\">{{settings.name}}</a>\n  \n        <!-- <ng-container *ngIf=\"states.length > 0\">\n          <span class=\"p-x-4\">&nbsp;</span>\n            <a class=\"cursor-pointer font-condensed font-rr-secondary text-transform-uppercase fw-600\" [matMenuTriggerFor]=\"menu\">{{selectedState.name}} <mat-icon class=\"font-rr-black\">arrow_drop_down</mat-icon></a>\n            <mat-menu #menu=\"matMenu\">\n              <button mat-menu-item (click)=\"changeState(s)\" [value]=\"s.name\" *ngFor=\"let s of states\">{{s.name}}</button>\n            </mat-menu>\n  \n        </ng-container> -->\n      \n        <span class=\"main-header-content\"> <!-- [ngStyle]=\"headerContentStyle\" -->\n            <!-- <eagna-tabs *ngIf=\"tabsData && tabsData.length>0\" [tabType]=\"'route'\" [(tabsData)]=\"tabsData\" style=\"width:auto;\"\n                [noRouterOutlet]=\"true\"></eagna-tabs> -->\n          <div class=\"toolbar-container\">\n            <ng-content>\n\n            </ng-content>\n          </div>\n        </span>\n        <!-- <eagna-userbar *ngIf=\"userbar == true\" style=\"position:absolute; right:0;top:0;\"></eagna-userbar> -->\n        <span class=\"spacer\"></span>\n        <button *ngIf=\"settings.rightIcons?.notif\" mat-icon-button aria-label=\"Notifications\" (click)=\"toggleNotification()\">\n          <mat-icon matBadge=\"99\" matBadgeSize=\"small\" matBadgeColor=\"primary\" class=\"badge-large\">notifications\n          </mat-icon>\n        </button>\n  \n        <button *ngIf=\"settings.rightIcons?.apps\" mat-icon-button aria-label=\"Apps\"> <!-- [matMenuTriggerFor]=\"appMenu\" -->\n          <mat-icon>apps</mat-icon>\n        </button>\n        <!-- app-menu-starts here -->\n        <!-- app-menu-ends here -->\n        <button *ngIf=\"settings.rightIcons?.contacts\" mat-icon-button aria-label=\"Contacts\" (click)=\"toggleContacts()\" class=\"toolbar-btn\">\n          <mat-icon>contacts</mat-icon>\n        </button>\n\n      </mat-toolbar-row>\n      <!-- <mat-toolbar-row class=\"sub-header\" *ngIf=\"settings.secondRow && settings.secondRow.status\"></mat-toolbar-row> -->\n    </mat-toolbar>", styles: [".mat-toolbar-multiple-rows{min-height:40px}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.EagnaListener }, { type: i2.Title }]; }, propDecorators: { settings: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 