import{r as registerInstance,h,H as Host,g as getElement}from"./index-BdVwMG9u.js";import{B as BEM}from"./bem-ByiN-QjD.js";var balBadgeCss=":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-font-weight-bold) !important;font-family:var(--bal-font-family-text) !important;font-size:var(--bal-text-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}";var Badge=function(){function a(a){registerInstance(this,a);this.size="";this.color="";this.position=""}a.prototype.render=function(){var a=BEM.block("badge");var e=a.element("label");var r=a.element("icon");var l=this.color!=="";var b=this.size!=="";var o=this.position!=="";var d=!!this.icon||this.size==="small";return h(Host,{key:"b705f8e38629cf8b549982aee4cdb37eaddd59de",class:Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),a.modifier("background-".concat(this.color)).class(l)),a.modifier("position-".concat(this.position)).class(o)),a.modifier("size-".concat(this.size)).class(b))},h("span",{key:"8ce1e8ecef96a6fd74365fd28d825e40f1ca43a8",class:Object.assign(Object.assign(Object.assign({},e.class()),e.modifier("color-".concat(this.color)).class(l)),e.modifier("hidden").class(d)),"data-testid":"bal-badge-label"},h("slot",{key:"4153dcd8209ef3bfb88792110ca25bc2ff874395"})),this.size!=="small"?h("bal-icon",{class:Object.assign(Object.assign({},r.class()),r.modifier("hidden").class(!d)),size:this.size===""?"small":"",name:this.icon,color:this.color==="grey"?"grey":"primary"}):"")};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return a}();Badge.style=balBadgeCss;export{Badge as bal_badge};