import { Component, HostBinding, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../icon/icon.component";
import * as i2 from "@angular/common";
export const badgeColors = ['primary', 'warning', 'critical'];
export const badgeSizes = ['m', 'l'];
export class BadgeComponent {
    constructor() {
        this.size = 'm';
    }
    ngOnInit() {
    }
    get iconSize() {
        switch (this.size) {
            case 'l':
                return 's';
            case 'm':
                return 'xs';
        }
        return this.size;
    }
    get iconStroke() {
        switch (this.size) {
            case 'l':
                return 1.5;
            case 'm':
                return 1;
        }
        return 2;
    }
}
BadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
BadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.4", type: BadgeComponent, selector: "ui-badge", inputs: { color: "color", size: "size", icon: "icon" }, host: { properties: { "attr.color": "this.color", "attr.size": "this.size", "attr.icon": "this.icon" } }, ngImport: i0, template: "<ui-icon [name]=\"icon\" [size]=\"iconSize\" [stroke]=\"iconStroke\" *ngIf=\"icon\"></ui-icon>\n<ng-container *ngIf=\"!icon\">\n  <ng-content></ng-content>\n</ng-container>\n", styles: [":host{display:flex;align-items:center;justify-content:center;border-radius:100px;overflow:hidden;padding:4px 5px;font-size:var(--font-size-xxs);color:var(--color-contrast-0);background-color:var(--color-contrast-40);border:2px solid var(--color-contrast-0)}:host[size=l][icon]{width:28px;height:28px}:host[size=m][icon]{width:16px;height:16px}:host[color=primary]{background-color:var(--color-primary);color:var(--color-primary-contrast)}:host[color=warning]{background-color:var(--color-warning);color:var(--color-warning-contrast)}:host[color=critical]{background-color:var(--color-critical);color:var(--color-critical-contrast)}"], components: [{ type: i1.IconComponent, selector: "ui-icon", inputs: ["name", "color", "size", "stroke", "styles"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.4", ngImport: i0, type: BadgeComponent, decorators: [{
            type: Component,
            args: [{
                    selector: 'ui-badge',
                    templateUrl: './badge.component.html',
                    styleUrls: ['./badge.component.scss']
                }]
        }], ctorParameters: function () { return []; }, propDecorators: { color: [{
                type: Input
            }, {
                type: HostBinding,
                args: ['attr.color']
            }], size: [{
                type: Input
            }, {
                type: HostBinding,
                args: ['attr.size']
            }], icon: [{
                type: Input
            }, {
                type: HostBinding,
                args: ['attr.icon']
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFkZ2UuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vdWkta2l0L3NyYy9saWIvYmFkZ2UvYmFkZ2UuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vdWkta2l0L3NyYy9saWIvYmFkZ2UvYmFkZ2UuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFTLE1BQU0sZUFBZSxDQUFDOzs7O0FBR3BFLE1BQU0sQ0FBQyxNQUFNLFdBQVcsR0FBRyxDQUFDLFNBQVMsRUFBRSxTQUFTLEVBQUUsVUFBVSxDQUFVLENBQUM7QUFHdkUsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHLENBQUMsR0FBRyxFQUFFLEdBQUcsQ0FBVSxDQUFDO0FBUTlDLE1BQU0sT0FBTyxjQUFjO0lBY3pCO1FBTkEsU0FBSSxHQUFjLEdBQUcsQ0FBQztJQU90QixDQUFDO0lBRUQsUUFBUTtJQUNSLENBQUM7SUFFRCxJQUFJLFFBQVE7UUFDVixRQUFRLElBQUksQ0FBQyxJQUFJLEVBQUU7WUFDakIsS0FBSyxHQUFHO2dCQUNOLE9BQU8s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