import{l as S,aI as V,v as N,m as h,y as d,aq as x,x as P,aJ as T,f as t,a2 as R,aD as _,G as u}from"./index-2dd0c7d2.js";import{m as w,z as I,g as L,b as $,N as q,j as A,n as D,J,O as M,c as X,M as Y,q as j}from"./VListItem-cb387084.js";const z=S({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:V,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(),...I({location:"top end"}),...L(),...$(),...N(),...q({transition:"scale-rotate-transition"})},"VBadge"),O=h()({name:"VBadge",inheritAttrs:!1,props:z(),setup(e,o){const{backgroundColorClasses:c,backgroundColorStyles:g}=A(d(e,"color")),{roundedClasses:m}=D(e),{t:b}=x(),{textColorClasses:f,textColorStyles:v}=J(d(e,"textColor")),{themeClasses:C}=P(),{locationStyles:y}=M(e,!0,a=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(a)?+(e.offsetY??0):["left","right"].includes(a)?+(e.offsetX??0):0));return X(()=>{const a=Number(e.content),n=!e.max||isNaN(a)?e.content:a<=+e.max?a:`${e.max}+`,[k,B]=T(o.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return t(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]},B,{style:e.style}),{default:()=>{var s,l;return[t("div",{class:"v-badge__wrapper"},[(l=(s=o.slots).default)==null?void 0:l.call(s),t(Y,{transition:e.transition},{default:()=>{var i,r;return[R(t("span",u({class:["v-badge__badge",C.value,c.value,m.value,f.value],style:[g.value,v.value,e.inline?{}:y.value],"aria-atomic":"true","aria-label":b(e.label,a),"aria-live":"polite",role:"status"},k),[e.dot?void 0:o.slots.badge?(r=(i=o.slots).badge)==null?void 0:r.call(i):e.icon?t(j,{icon:e.icon},null):n]),[[_,e.modelValue]])]}})])]}})}),{}}});export{O as V};
