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: "13.3.4", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
BadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.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)}\n"], 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: "13.3.4", ngImport: i0, type: BadgeComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ui-badge', 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)}\n"] }]
        }], 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFkZ2UuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vdWkta2l0L3NyYy9saWIvYmFkZ2UvYmFkZ2UuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vdWkta2l0L3NyYy9saWIvYmFkZ2UvYmFkZ2UuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxXQUFXLEVBQUUsS0FBSyxFQUFTLE1BQU0sZUFBZSxDQUFDOzs7O0FBR3BFLE1BQU0sQ0FBQyxNQUFNLFdBQVcsR0FBR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