import { ChangeDetectionStrategy, Component, HostBinding, Input, ViewEncapsulation } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../../directives/evo-ui-class.directive";
export class EvoBadgeComponent {
    constructor() {
        this.size = 'normal';
        /**
         * @deprecated don't use it
         */
        this.multiline = false;
    }
    get styleWidth() {
        return this.widthPercents ? `${this.widthPercents}%` : this.widthPixels ? `${this.widthPixels}px` : undefined;
    }
    get classes() {
        const classes = [];
        if (this.size) {
            classes.push(this.size);
        }
        if (this.color) {
            classes.push(this.color);
        }
        if (this.multiline) {
            classes.push('multiline');
        }
        return classes;
    }
}
EvoBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: EvoBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
EvoBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EvoBadgeComponent, selector: "evo-badge", inputs: { color: "color", size: "size", multiline: "multiline", widthPixels: ["width.px", "widthPixels"], widthPercents: ["width.%", "widthPercents"] }, host: { properties: { "style.width": "this.styleWidth" } }, ngImport: i0, template: "<div class=\"evo-badge\" [evoUiClass]=\"classes\">\n    <ng-content></ng-content>\n</div>\n", styles: ["evo-badge{display:block;width:max-content;--evo-badge-color: #FFFFFF;--evo-badge-background-color: none;--evo-badge-background-image: none}evo-badge .evo-badge{--inner-icon-size: 20px;--inner-gap: 8px;--inner-min-height: 24px;--inner-padding: 1px 0;--inner-color: #FFFFFF;--inner-background-color: #91B1B8;--inner-background-image: none;display:flex;justify-content:center;align-items:center;grid-gap:var(--inner-gap);gap:var(--inner-gap);padding:var(--inner-padding);width:100%;min-height:var(--inner-min-height);border-radius:4px;overflow:hidden;white-space:nowrap;text-align:center;color:var(--inner-color);background-color:var(--inner-background-color);background-image:var(--inner-background-image)}evo-badge .evo-badge>evo-icon{display:block;width:var(--inner-icon-size);height:var(--inner-icon-size);margin:0 -4px;fill:currentColor}evo-badge .evo-badge_success{--inner-color: #FFFFFF;--inner-background-color: #21C68B}evo-badge .evo-badge_error{--inner-color: #FFFFFF;--inner-background-color: #FF1817}evo-badge .evo-badge_icon-dark{--inner-color: #FFFFFF;--inner-background-color: #91B1B8}evo-badge .evo-badge_icon-light{--inner-color: #FFFFFF;--inner-background-color: #BEDCE3}evo-badge .evo-badge_graph-1{--inner-color: #FFFFFF;--inner-background-color: #EB5365}evo-badge .evo-badge_graph-2{--inner-color: #FFFFFF;--inner-background-color: #9474C9}evo-badge .evo-badge_graph-3{--inner-color: #FFFFFF;--inner-background-color: #41B2E5}evo-badge .evo-badge_graph-4{--inner-color: #FFFFFF;--inner-background-color: #3CCFCF}evo-badge .evo-badge_graph-5{--inner-color: #FFFFFF;--inner-background-color: #B7CE2C}evo-badge .evo-badge_graph-6{--inner-color: #FFFFFF;--inner-background-color: #F4D221}evo-badge .evo-badge_graph-7{--inner-color: #FFFFFF;--inner-background-color: #F0A042}evo-badge .evo-badge_graph-8{--inner-color: #FFFFFF;--inner-background-color: #F87550}evo-badge .evo-badge_graph-9{--inner-color: #FFFFFF;--inner-background-color: #847474}evo-badge .evo-badge_graph-10{--inner-color: #FFFFFF;--inner-background-color: #7A96A5}evo-badge .evo-badge_grey{--inner-color: #727272;--inner-background-color: #F4F6F8}evo-badge .evo-badge_rating{--inner-color: #FFFFFF;--inner-background-color: #F2C94C}evo-badge .evo-badge_primary{--inner-color: #FFFFFF;--inner-background-color: #F05023}evo-badge .evo-badge_custom{--inner-background-color: var(--evo-badge-background-color);--inner-background-image: var(--evo-badge-background-image);--inner-color: var(--evo-badge-color)}evo-badge .evo-badge_small{--inner-icon-size: 16px;--inner-padding: 0 6px;--inner-min-height: 18px;font-family:var(--evo-font);font-style:normal;font-size:12px;line-height:18px;font-weight:600}evo-badge .evo-badge_normal{--inner-icon-size: 20px;--inner-padding: 1px 8px;--inner-min-height: 24px;font-family:var(--evo-font);font-style:normal;font-size:14px;line-height:22px;font-weight:600}evo-badge .evo-badge_large{--inner-icon-size: 24px;--inner-padding: 3px 8px;--inner-min-height: 32px;font-family:var(--evo-font);font-style:normal;font-size:18px;line-height:26px;font-weight:600}\n"], directives: [{ type: i1.EvoUiClassDirective, selector: "[evoUiClass]", inputs: ["class", "evoUiClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: EvoBadgeComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'evo-badge',
                    templateUrl: './evo-badge.component.html',
                    styleUrls: ['./evo-badge.component.scss'],
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    encapsulation: ViewEncapsulation.None,
                }]
        }], propDecorators: { color: [{
                type: Input
            }], size: [{
                type: Input
            }], multiline: [{
                type: Input
            }], widthPixels: [{
                type: Input,
                args: ['width.px']
            }], widthPercents: [{
                type: Input,
                args: ['width.%']
            }], styleWidth: [{
                type: HostBinding,
                args: ['style.width']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZvLWJhZGdlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2V2by11aS1raXQvc3JjL2xpYi9jb21wb25lbnRzL2V2by1iYWRnZS9ldm8tYmFkZ2UuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXZvLXVpLWtpdC9zcmMvbGliL2NvbXBvbmVudHMvZXZvLWJhZGdlL2V2by1iYWRnZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxLQUFLLEVBQUUsaUJBQWlCLEVBQUMsTUFBTSxlQUFlLENBQUM7O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