import { __decorate, __metadata } from "tslib";
import { Component, Input } from '@angular/core';
let AppBarComponent = class AppBarComponent {
    constructor() {
        this.user = {};
        this.userMenuItems = [];
        this.userMenuWidth = 160;
        this.userMenuTabindex = 0;
    }
};
__decorate([
    Input(),
    __metadata("design:type", Object)
], AppBarComponent.prototype, "user", void 0);
__decorate([
    Input(),
    __metadata("design:type", Array)
], AppBarComponent.prototype, "userMenuItems", void 0);
__decorate([
    Input(),
    __metadata("design:type", Object)
], AppBarComponent.prototype, "userMenuWidth", void 0);
__decorate([
    Input(),
    __metadata("design:type", Object)
], AppBarComponent.prototype, "userMenuTabindex", void 0);
AppBarComponent = __decorate([
    Component({
        selector: 'ec-app-bar',
        template: "<section class=\"logo-container\">\r\n  <div class=\"ec-logo\"\r\n       role=\"img\"\r\n       aria-label=\"EnergyCAP Software Logo\"></div>\r\n</section>\r\n\r\n<section class=\"title-container\">\r\n  <ng-content select=\".app-bar-title\"></ng-content>\r\n</section>\r\n\r\n<section class=\"actions-container\">\r\n  <ng-content select=\".app-bar-actions\"></ng-content>\r\n  <ec-dropdown id=\"AppBarUserMenu\"\r\n               *ngIf=\"userMenuItems.length; else avatar\"\r\n               [menuTitle]=\"user?.userMenuTitle\"\r\n               [items]=\"userMenuItems\"\r\n               [buttonCustomTemplate]=\"avatar\"\r\n               [showArrow]=\"false\"\r\n               [menuWidth]=\"userMenuWidth\"\r\n               [tabindex]=\"userMenuTabindex\"></ec-dropdown>\r\n</section>\r\n\r\n<ng-template #avatar>\r\n  <div class=\"p-1\">\r\n    <ec-avatar [user]=\"user\"></ec-avatar>\r\n  </div>\r\n</ng-template>",
        styles: ["@-webkit-keyframes spin{from{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes spin{from{transform:rotate(0)}to{transform:rotate(1turn)}}:host{display:flex;height:3rem;align-items:center;width:100%;padding:0 .75rem 0 1rem;background-color:#fff;position:relative;z-index:5}:host ::ng-deep .app-bar-actions{display:flex;align-items:center;justify-content:flex-end;margin-right:.25rem}section{flex:1 1}.title-container{text-align:center}.actions-container{display:flex;justify-content:flex-end}.ec-logo{background-position-x:left}"]
    })
], AppBarComponent);
export { AppBarComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLWJhci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZW5lcmd5Y2FwL2NvbXBvbmVudHMvIiwic291cmNlcyI6WyJsaWIvZGlzcGxheS9hcHAtYmFyL2FwcC1iYXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQVNqRCxJQUFhLGVBQWUsR0FBNUIsTUFBYSxlQUFlO0lBQTVCO1FBQ1csU0FBSSxHQUFlLEVBQUUsQ0FBQztRQUN0QixrQkFBYSxHQUFlLEVBQUUsQ0FBQztRQUMvQixrQkFBYSxHQUFHLEdBQUcsQ0FBQztRQUNwQixxQkFBZ0IsR0FBRyxDQUFDLENBQUM7SUFDaEMsQ0FBQztDQUFBLENBQUE7QUFKVTtJQUFSLEtBQUssRUFBRTs7NkNBQXVCO0FBQ3RCO0lBQVIsS0FBSyxFQUFFOztzREFBZ0M7QUFDL0I7SUFBUixLQUFLLEVBQUU7O3NEQUFxQjtBQUNwQjtJQUFSLEtBQUssRUFBRTs7eURBQXNCO0FBSm5CLGVBQWU7SUFMM0IsU0FBUyxDQUFDO1FBQ1QsUUFBUSxFQUFFLFlBQVk7UUFDdEIsdTZCQUF1Qzs7S0FFeEMsQ0FBQztHQUNXLGVBQWUsQ0FLM0I7U0FMWSxlQUFlIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBJbnB1dCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgeyBNZW51SXRlbSB9IGZyb20gJy4uLy4uL2NvbnRyb2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