import { __decorate, __param } from "tslib";
import { Component, Input, Optional } from '@angular/core';
import { SelectComponent } from '../../select.component';
let OptionAccountComponent = class OptionAccountComponent {
    constructor(select) {
        this.select = select;
        this.inline = true;
        this.balance = null;
        this.labeledSelectedState = true;
    }
    ngOnInit() {
    }
    get label() {
        var _a;
        return ((_a = this.select) === null || _a === void 0 ? void 0 : _a.label) || null;
    }
};
OptionAccountComponent.ctorParameters = () => [
    { type: SelectComponent, decorators: [{ type: Optional }] }
];
__decorate([
    Input()
], OptionAccountComponent.prototype, "inline", void 0);
__decorate([
    Input()
], OptionAccountComponent.prototype, "currency", void 0);
__decorate([
    Input()
], OptionAccountComponent.prototype, "balance", void 0);
__decorate([
    Input()
], OptionAccountComponent.prototype, "labeledSelectedState", void 0);
OptionAccountComponent = __decorate([
    Component({
        selector: 'ui-option-account',
        template: "<div class=\"currency\" *ngIf=\"currency\">\n  <ui-currency-flag [currency]=\"currency\"></ui-currency-flag>\n</div>\n<div>\n  <div class=\"label\" *ngIf=\"labeledSelectedState\">\n    {{label}}\n  </div>\n  <div class=\"account\" [class.account--inline]=\"labeledSelectedState\">\n    <div class=\"account__name\">\n      <ng-content></ng-content>\n    </div>\n    <div class=\"account__balance\" *ngIf=\"balance !== null && currency\">\n      {{balance | currency: currency:'symbol-narrow':'0.2-8'}}\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}.currency{flex-shrink:0}.account--inline{display:flex}.account__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.account__balance{font-size:var(--font-size-s);color:var(--color-contrast-40);padding-top:4px}.account--inline .account__balance{font-size:var(--font-size);padding:0 0 0 12px}"]
    }),
    __param(0, Optional())
], OptionAccountComponent);
export { OptionAccountComponent };
//# sourceMapping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