import { Component, HostBinding, Input } from '@angular/core';
import { coerceBooleanProperty } from '@angular/cdk/coercion';
import * as i0 from "@angular/core";
import * as i1 from "../../../currency-flag/currency-flag.component";
import * as i2 from "@angular/common";
export class OptionAccountComponent {
    constructor() {
        this.compact = false;
        this.balance = null;
    }
    set setCompact(value) {
        this.compact = coerceBooleanProperty(value);
    }
    ngOnInit() {
    }
}
OptionAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: OptionAccountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
OptionAccountComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: OptionAccountComponent, selector: "ui-option-account", inputs: { currency: "currency", balance: "balance", setCompact: ["compact", "setCompact"] }, host: { properties: { "class.compact": "this.compact" } }, ngImport: i0, template: "<div class=\"currency\" *ngIf=\"currency\">\n  <ui-currency-flag [currency]=\"currency\" [size]=\"compact ? 's' : 'm'\"></ui-currency-flag>\n</div>\n<div>\n  <div class=\"account\" [class.account--inline]=\"compact\">\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: [":host{display:grid;grid-template-columns:auto minmax(1px,1fr);align-items:center;grid-gap:12px;gap:12px}:host.compact{grid-gap:8px;gap:8px}:host-context(ui-select-option.disabled){cursor:not-allowed}.currency{flex-shrink:0}.account--inline{display:flex;justify-content:space-between}.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}"], components: [{ type: i1.CurrencyFlagComponent, selector: "ui-currency-flag", inputs: ["currency", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "currency": i2.CurrencyPipe } });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: OptionAccountComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'ui-option-account',
                    templateUrl: './option-account.component.html',
                    styleUrls: ['./option-account.component.scss']
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { compact: [{
                type: HostBinding,
                args: ['class.compact']
            }], currency: [{
                type: Input
            }], balance: [{
                type: Input
            }], setCompact: [{
                type: Input,
                args: ['compact']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uLWFjY291bnQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vdWkta2l0L3NyYy9saWIvZm9ybS9vcHRpb24vb3B0aW9uLWFjY291bnQvb3B0aW9uLWFjY291bnQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vdWkta2l0L3NyYy9saWIvZm9ybS9vcHRpb24vb3B0aW9uLWFjY291bnQvb3B0aW9uLWFjY291bnQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFTLE1BQU0sZUFBZSxDQUFDO0FBQ3BFLE9BQU8sRUFBQyxxQkFBcUIsRUFBQyxNQUFNLHVCQUF1QixDQUFDOzs7O0FBTzVELE1BQU0sT0FBTyxzQkFBc0I7SUFZakM7UUFUQSxZQUFPLEdBQUcsS0FBSyxDQUFDO1FBR1AsWUFBTyxHQUFvQixJQUFJLENBQUM7SUFPekMsQ0FBQztJQUxELElBQXNCLFVBQVUsQ0FBQyxLQUFjO1FBQzdDLElBQUksQ0FBQyxPQUFPLEdBQUcscUJBQXFCLENBQUMsS0FBSyxDQUFDLENBQUM7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