import{p as S,aH as V,m as h,g as N,t as d,ad as P,ac as x,aI as T,j as t,R,ah as _,k as u}from"./index-dcf0de03.js";import{a as w,y as I,c as L,d as $,G as j,e as A,g as H,H as M,B as X,i as Y,M as D,j as F}from"./VBtn-a0da5efe.js";const G=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(),...$(),...h(),...j({transition:"scale-rotate-transition"})},"VBadge"),E=N()({name:"VBadge",inheritAttrs:!1,props:G(),setup(e,o){const{backgroundColorClasses:c,backgroundColorStyles:g}=A(d(e,"color")),{roundedClasses:m}=H(e),{t:b}=P(),{textColorClasses:f,textColorStyles:v}=M(d(e,"textColor")),{themeClasses:C}=x(),{locationStyles:k}=X(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 Y(()=>{const a=Number(e.content),n=!e.max||isNaN(a)?e.content:a<=+e.max?a:`${e.max}+`,[y,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(D,{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?{}:k.value],"aria-atomic":"true","aria-label":b(e.label,a),"aria-live":"polite",role:"status"},y),[e.dot?void 0:o.slots.badge?(r=(i=o.slots).badge)==null?void 0:r.call(i):e.icon?t(F,{icon:e.icon},null):n]),[[_,e.modelValue]])]}})])]}})}),{}}});export{E as V};
