import{r as t,h as e,H as a,g as s}from"./p-2b0a6102.js";const i='.bs-badge{--badge-bg:var(--bs-red-base);--badge-text:var(--bs-white)}.bs-badge[data-position^=left]::before,.bs-badge:where(:not([data-position^="left"]))::after{align-items:center;background:var(--badge-bg);border-radius:0.5rem;content:"";display:inline-flex;font-size:0.8125rem;font-variant-numeric:tabular-nums;font-weight:600;height:6px;justify-content:center;line-height:1;position:relative;vertical-align:top;width:6px}.bs-pill .bs-badge::before,.bs-pill .bs-badge::after{font-size:0.8125em}.bs-badge[data-count]:where([data-position^="left"])::before,.bs-badge[data-count]:where(:not([data-position^="left"]))::after{color:var(--badge-text);content:attr(data-count);min-height:1rem;min-width:1rem;padding:0 4px;top:-0.0625rem;vertical-align:unset;width:auto}.bs-badge[data-count]::before{margin-right:0.25rem}.bs-badge[data-count]::after{margin-left:0.25rem}.bs-badge[data-count="0"]::before,.bs-badge[data-count="0"]::after{display:none}.bs-badge[data-show-zero]:where(:not([data-show-zero="false"]))::before,.bs-badge[data-show-zero]:where(:not([data-show-zero="false"]))::after{display:inline-flex}.bs-badge[data-badge-color^=blue]{--badge-bg:var(--bs-blue-base)}.bs-badge[data-badge-color^=white]{--badge-bg:var(--bs-white);--badge-text:var(--bs-black)}bs-badge{display:inline-block}';const r=class{constructor(e){t(this,e);this.color=undefined;this.count=undefined;this.countMax=99;this.dot=undefined;this.label="item";this.position=undefined;this.showZero=undefined}get countFmt(){if(this.count===0)return"0";if(!this.count||this.dot)return null;return this.count>this.countMax?this.countMax+"+":this.count.toString()}get labelFmt(){const t=this.hostEl.textContent.trim();const e=this.countFmt?this.countFmt+" ":"";if(!e&&!this.dot)return t;const a=this.count!==1?"s":"";return`${t}, ${e}${this.label}${a}`}render(){return e(a,{class:(this.dot||this.countFmt)&&"bs-badge","data-badge-color":this.color,"data-count":this.countFmt,"data-position":this.position,"data-show-zero":this.showZero,"aria-label":this.labelFmt},e("slot",null))}get hostEl(){return s(this)}};r.style=i;export{r as bs_badge};
//# sourceMappingURL=p-202a6121.entry.js.map