import{g as V,p as B,a9 as P,ab as h,av as x,a7 as T,M as _,bJ as M,b5 as R,u as w,c1 as D,c as o,x as d,Z as L,_ as A,O as u,V as I,b3 as X,al as Y,m as $,ae as F,bM as J,a as O,ag as W}from"./index-C5GbdPxY.js";import{M as Z,m as j}from"./VImg-BlqLjeEy.js";const q=B({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:W,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...O(),...J({location:"top end"}),...F(),...$(),...Y(),...j({transition:"scale-rotate-transition"}),...X()},"VBadge"),G=V()({name:"VBadge",inheritAttrs:!1,props:q(),setup(e,t){const{backgroundColorClasses:c,backgroundColorStyles:m}=P(()=>e.color),{roundedClasses:b}=h(e),{t:g}=x(),{textColorClasses:f,textColorStyles:v}=T(()=>e.textColor),{themeClasses:C}=_(),{locationStyles:k}=M(e,!0,a=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(a)?Number(e.offsetY??0):["left","right"].includes(a)?Number(e.offsetX??0):0)),{dimensionStyles:y}=R(e);return w(()=>{const a=Number(e.content),n=!e.max||isNaN(a)?e.content:a<=Number(e.max)?a:`${e.max}+`,[N,S]=D(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return o(e.tag,u({class:["v-badge",{"v-badge--bordered":e.bordered,"v-badge--dot":e.dot,"v-badge--floating":e.floating,"v-badge--inline":e.inline},e.class]},S,{style:e.style}),{default:()=>{var s,l;return[d("div",{class:"v-badge__wrapper"},[(l=(s=t.slots).default)==null?void 0:l.call(s),o(Z,{transition:e.transition},{default:()=>{var i,r;return[L(d("span",u({class:["v-badge__badge",C.value,c.value,b.value,f.value],style:[m.value,v.value,y.value,e.inline?{}:k.value],"aria-atomic":"true","aria-label":g(e.label,a),"aria-live":"polite",role:"status"},N),[e.dot?void 0:t.slots.badge?(r=(i=t.slots).badge)==null?void 0:r.call(i):e.icon?o(I,{icon:e.icon},null):n]),[[A,e.modelValue]])]}})])]}})}),{}}});export{G as V};
