import{af as n}from"./vue.runtime.esm-Ct3_M7aQ.chunk.mjs";import{n as i}from"./index-BMeBqg0T.chunk.mjs";const o={name:"NcCounterBubble",props:{type:{type:String,default:"",validator(t){return["highlighted","outlined",""].includes(t)}},active:{type:Boolean,default:!1},count:{type:Number,required:!1,default:void 0},raw:{type:Boolean,required:!1,default:!1}},computed:{counterClassObject(){return{"counter-bubble__counter--highlighted":this.type==="highlighted","counter-bubble__counter--outlined":this.type==="outlined",active:this.active}},humanizedCount(){return this.humanizeCount(this.count)}},methods:{humanizeCount(t){return this.raw?t.toString():new Intl.NumberFormat(n(),{notation:"compact",compactDisplay:"short"}).format(t)},getHumanizedCount(){if(this.count!==void 0)return{humanized:this.humanizedCount,original:this.count.toString()};if(!this.raw&&this.$slots.default?.length===1){const t=this.$slots.default[0].text?.trim();if(t&&/^\d+$/.test(t)){const e=parseInt(t,10);return{humanized:this.humanizeCount(e),original:t}}}}},render(t){const e=this.getHumanizedCount();return t("div",{staticClass:"counter-bubble__counter",class:this.counterClassObject,attrs:{title:e&&e.original!==e.humanized?e.original:void 0}},[e?.humanized??this.$slots.default])}},u=null,r=null;var a=i(o,u,r,!1,null,"f1abaa29");const h=a.exports;export{h as N};
//# sourceMappingURL=NcListItem-DfaWGP5A-eZQtYwBb.chunk.mjs.map
