import{r as t,h as i,H as s,g as e}from"./p-6b2342e0.js";import{s as o}from"./p-717cb35f.js";import"./p-dcc98162.js";import{I as r}from"./p-c45f0189.js";import{V as n,I as a}from"./p-9deec7a5.js";var h=function(t,i,s,e){var o,r=arguments.length,n=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,s,e);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(i,s,n):o(i,s))||n);return r>3&&n&&Object.defineProperty(i,s,n),n};const l=class{constructor(i){t(this,i),this.globalSlimmers={},this.vegaComponentUsageRuntimeMetricsSlimmer=new n,this.dot=!1,this.color="bg-danger",this.count=0,this.offset=[0,0]}render(){return o(i(s,null,i("div",{class:{dot:this.count>0&&this.dot,counter:this.count>0&&!this.dot,"multi-digit":this.count>=10&&!this.dot,"v-bg-danger":"bg-action"!=this.color,"v-bg-action":"bg-action"==this.color,"default-position":this.count>0},style:{right:-this.offset[0]+"px",top:`${this.offset[1]}px`}},this.renderCounter()),i("slot",null)),this.host)}renderCounter(){if(this.count>0&&!this.dot)return i("span",null,this.count>99?"99+":this.count)}get host(){return e(this)}};h([a()],l.prototype,"globalSlimmers",void 0),h([r()],l.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),l.style=':host{display:block;position:relative;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host .dot{display:inline-block;position:absolute;border-radius:9999px;width:9px;height:9px}:host .counter{display:flex;position:absolute;height:20px;min-width:20px;border-radius:9999px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1));justify-content:center;align-items:center;font-family:"Inter", sans-serif;font-weight:700;font-size:12px;line-height:15px}:host .default-position{top:0px;right:0px;transform:scale(1) translate(50%, -50%)}:host .multi-digit{padding-left:4px;padding-right:4px}:host .v-bg-danger{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}:host .v-bg-action{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}';export{l as vega_counter_badge}