import { Component, EventEmitter, Input, Output } from '@angular/core';
import { LanguageCode } from '../../common/generated-types';
export class UserMenuComponent {
    constructor() {
        this.userName = '';
        this.availableLanguages = [];
        this.logOut = new EventEmitter();
        this.selectUiLanguage = new EventEmitter();
    }
}
UserMenuComponent.decorators = [
    { type: Component, args: [{
                selector: 'vdr-user-menu',
                template: "<vdr-dropdown>\r\n    <button class=\"btn btn-link trigger\" vdrDropdownTrigger>\r\n        <span class=\"user-name\">{{ userName }}</span>\r\n        <clr-icon shape=\"user\" size=\"24\"></clr-icon>\r\n        <clr-icon shape=\"caret down\"></clr-icon>\r\n    </button>\r\n    <vdr-dropdown-menu vdrPosition=\"bottom-right\">\r\n        <a [routerLink]=\"['/settings', 'profile']\" vdrDropdownItem>\r\n            <clr-icon shape=\"user\" class=\"is-solid\"></clr-icon> {{ 'settings.profile' | translate }}\r\n        </a>\r\n        <ng-container *ngIf=\"1 < availableLanguages.length\">\r\n            <button\r\n                type=\"button\"\r\n                vdrDropdownItem\r\n                (click)=\"selectUiLanguage.emit()\"\r\n                [title]=\"'common.select-display-language' | translate\"\r\n            >\r\n                <clr-icon shape=\"language\"></clr-icon> {{ 'lang.' + uiLanguage | translate }}\r\n            </button>\r\n        </ng-container>\r\n        <div class=\"dropdown-item\">\r\n            <vdr-theme-switcher></vdr-theme-switcher>\r\n        </div>\r\n        <div class=\"dropdown-divider\"></div>\r\n        <button type=\"button\" vdrDropdownItem (click)=\"logOut.emit()\">\r\n            <clr-icon shape=\"logout\"></clr-icon> {{ 'common.log-out' | translate }}\r\n        </button>\r\n    </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n",
                styles: [":host{display:flex;align-items:center;margin:0 .5rem;height:2.5rem}.user-name{color:var(--color-grey-200);margin-right:12px}@media screen and (max-width:768px){.user-name{display:none}}.trigger clr-icon{color:#fff}"]
            },] }
];
UserMenuComponent.propDecorators = {
    userName: [{ type: Input }],
    availableLanguages: [{ type: Input }],
    uiLanguage: [{ type: Input }],
    logOut: [{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