import { __decorate, __metadata } from "tslib";
import { Component, Input } from '@angular/core';
var AppBarComponent = /** @class */ (function () {
    function AppBarComponent() {
        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);
    return AppBarComponent;
}());
export { AppBarComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwLWJhci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZW5lcmd5Y2FwL2NvbXBvbmVudHMvIiwic291cmNlcyI6WyJsaWIvZGlzcGxheS9hcHAtYmFyL2FwcC1iYXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQVNqRDtJQUFBO1FBQ1csU0FBSSxHQUFlLEVBQUUsQ0FBQztRQUN0QixrQkFBYSxHQUFlLEVBQUUsQ0FBQztRQUMvQixrQkFBYSxHQUFHLEdBQUcsQ0FBQztRQUNwQixxQkFBZ0IsR0FBRyxDQUFDLENBQUM7SUFDaEMsQ0FBQztJQUpVO1FBQVIsS0FBSyxFQUFFOztpREFBdUI7SUFDdEI7UUFBUixLQUFLLEVBQUU7OzBEQUFnQztJQUMvQjtRQUFSLEtBQUssRUFBRTs7MERBQXFCO0lBQ3BCO1FBQVIsS0FBSyxFQUFFOzs2REFBc0I7SUFKbkIsZUFBZTtRQUwzQixTQUFTLENBQUM7WUFDVCxRQUFRLEVBQUUsWUFBWTtZQUN0Qix1NkJBQXVDOztTQUV4QyxDQUFDO09BQ1csZUFBZSxDQUszQjtJQUFELHNCQUFDO0NBQUEsQUFMRCxJQUtDO1NBTFksZUFBZSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCwgSW5wdXQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuaW1wb3J0IHsgTWVudUl0ZW0gfSBmcm9tICcuLi8uLi9jb250cm9scy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