import{r as a,h as e,H as l,g as r}from"./p-4c596c7f.js";import{B as b}from"./p-33de3866.js";const o=class{constructor(e){a(this,e),this.icon=void 0,this.size="",this.color="",this.position=""}render(){const a=b.block("badge"),r=a.element("label"),o=a.element("icon"),d=""!==this.color,t=""!==this.size,g=""!==this.position,n=!!this.icon||"small"===this.size;return e(l,{class:Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),a.modifier(`background-${this.color}`).class(d)),a.modifier(`position-${this.position}`).class(g)),a.modifier(`size-${this.size}`).class(t))},e("span",{class:Object.assign(Object.assign(Object.assign({},r.class()),r.modifier(`color-${this.color}`).class(d)),r.modifier("hidden").class(n)),"data-testid":"bal-badge-label"},e("slot",null)),"small"!==this.size?e("bal-icon",{class:Object.assign(Object.assign({},o.class()),o.modifier("hidden").class(!n)),size:""===this.size?"small":"",name:this.icon,color:"grey"===this.color?"grey":"primary"}):"")}get el(){return r(this)}};o.style={css:":root{--bal-badge-background:var(--bal-color-red-3);--bal-badge-background-grey:var(--bal-color-grey-3);--bal-badge-background-red:var(--bal-color-red-3);--bal-badge-background-yellow:var(--bal-color-yellow-3);--bal-badge-background-green:var(--bal-color-green-3);--bal-badge-background-purple:var(--bal-color-purple-3);--bal-badge-radius:var(--bal-radius-rounded);--bal-badge-text-color:var(--bal-color-text-primary);--bal-badge-color-grey:var(--bal-color-text-grey-dark);--bal-badge-color-red:var(--bal-color-text-primary);--bal-badge-color-yellow:var(--bal-color-text-primary);--bal-badge-color-green:var(--bal-color-text-primary);--bal-badge-color-purple:var(--bal-color-text-primary)}.bal-badge{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;min-width:1.5rem;height:1.5rem;border-radius:var(--bal-badge-radius);background:var(--bal-badge-background);padding:.25rem}.bal-badge--size-small{width:.75rem;max-width:.75rem;min-width:.75rem;height:.75rem}.bal-badge--size-large{width:2rem;height:2rem}.bal-badge--background-red,.bal-badge--background-danger{background:var(--bal-badge-background-red)}.bal-badge--background-yellow,.bal-badge--background-warning{background:var(--bal-badge-background-yellow)}.bal-badge--background-green,.bal-badge--background-success{background:var(--bal-badge-background-green)}.bal-badge--background-purple{background:var(--bal-badge-background-purple)}.bal-badge--background-grey{background:var(--bal-badge-background-grey)}.bal-badge--position-card,.bal-badge--position-button{position:absolute;right:-0.5rem;top:-0.5rem}.bal-badge--position-tabs{margin-top:-0.25rem;position:absolute;right:-1.625rem}.bal-badge--position-tabs.bal-badge--size-small{right:-1rem}span.bal-badge__label{font-weight:var(--bal-weight-bold) !important;font-family:var(--bal-font-family-text) !important;font-size:var(--bal-size-small) !important;color:var(--bal-badge-text-color);line-height:1.5rem !important;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}span.bal-badge__label--hidden{display:none !important}span.bal-badge__label--color-red,span.bal-badge__label--color-danger{color:var(--bal-badge-color-red)}span.bal-badge__label--color-yellow,span.bal-badge__label--color-warning{color:var(--bal-badge-color-yellow)}span.bal-badge__label--color-green,span.bal-badge__label--color-success{color:var(--bal-badge-color-green)}span.bal-badge__label--color-grey{color:var(--bal-badge-color-grey)}span.bal-badge__label--color-purple{color:var(--bal-badge-color-purple)}.bal-badge__icon--hidden{display:none !important}"};export{o as bal_badge}