import { __decorate, __param } from "tslib";
import { Component, Input, Optional } from '@angular/core';
import { SelectComponent } from '../../select.component';
let OptionUserComponent = class OptionUserComponent {
    constructor(select) {
        this.select = select;
        this.inline = true;
        this.labeledSelectedState = true;
    }
    ngOnInit() {
    }
    get label() {
        var _a;
        return ((_a = this.select) === null || _a === void 0 ? void 0 : _a.label) || null;
    }
};
OptionUserComponent.ctorParameters = () => [
    { type: SelectComponent, decorators: [{ type: Optional }] }
];
__decorate([
    Input()
], OptionUserComponent.prototype, "inline", void 0);
__decorate([
    Input()
], OptionUserComponent.prototype, "account", void 0);
__decorate([
    Input()
], OptionUserComponent.prototype, "avatar", void 0);
__decorate([
    Input()
], OptionUserComponent.prototype, "labeledSelectedState", void 0);
OptionUserComponent = __decorate([
    Component({
        selector: 'ui-option-user',
        template: "<div class=\"avatar\">\n  {{avatar}}\n</div>\n<div>\n  <div class=\"label\" *ngIf=\"labeledSelectedState\">\n    {{label}}\n  </div>\n  <div class=\"user\" [class.user--inline]=\"labeledSelectedState\">\n    <div class=\"user__name\">\n      <ng-content></ng-content>\n    </div>\n    <div class=\"user__account\" *ngIf=\"account\">\n      {{account}}\n    </div>\n  </div>\n</div>\n",
        styles: ["@charset \"UTF-8\";:host{display:grid;grid-template-columns:auto minmax(1px,1fr);align-items:center;gap:12px}:host-context(ui-option.disabled){cursor:not-allowed}.label{display:none;font-size:var(--font-size-s);color:var(--color-contrast-40);padding:0 0 5px}:host-context(ui-select.select) .label{display:block}.avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;overflow:hidden;background:var(--color-contrast-5);font-size:var(--font-size-s);font-weight:var(--font-weight-medium);flex-shrink:0}.user--inline{display:flex}.user__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user__account{font-size:var(--font-size-s);color:var(--color-contrast-40);padding-top:4px}.user--inline .user__account{font-size:var(--font-size);padding:0 0 0 12px}"]
    }),
    __param(0, Optional())
], OptionUserComponent);
export { OptionUserComponent };
//# sourceMapping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