import{n as o,x as s,a2 as N,a3 as k,v as l}from"./vue-CPEHuaRL.js";import{N as y,a1 as S,a8 as B,$ as V,a9 as h,o as P,u as x,b as T,aa as R,a as _,a3 as w,a5 as D}from"./index-vmUNdjsE.js";import{g as I,h as L,b as $,u as A,i as X,p as Y,I as F,f as M,m as W}from"./vuetify-DlufGdsb.js";const j=Y({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:F,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...W(),...D({location:"top end"}),...w(),..._(),...M(),...R({transition:"scale-rotate-transition"}),...T()},"VBadge"),G=I()({name:"VBadge",inheritAttrs:!1,props:j(),setup(e,t){const{backgroundColorClasses:i,backgroundColorStyles:r}=y(()=>e.color),{roundedClasses:u}=S(e),{t:d}=L(),{textColorClasses:c,textColorStyles:m}=B(()=>e.textColor),{themeClasses:g}=$(),{locationStyles:b}=V(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:f}=x(e);return A(()=>{const a=Number(e.content),n=!e.max||isNaN(a)?e.content:a<=Number(e.max)?a:`${e.max}+`,[v,C]=X(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return o(e.tag,l({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]},C,{style:e.style}),{default:()=>[s("div",{class:"v-badge__wrapper"},[t.slots.default?.(),o(h,{transition:e.transition},{default:()=>[N(s("span",l({class:["v-badge__badge",g.value,i.value,u.value,c.value],style:[r.value,m.value,f.value,e.inline?{}:b.value],"aria-atomic":"true","aria-label":d(e.label,a),"aria-live":"polite",role:"status"},v),[e.dot?void 0:t.slots.badge?t.slots.badge?.():e.icon?o(P,{icon:e.icon},null):n]),[[k,e.modelValue]])]})])]})}),{}}});export{G as V};
