import{p as B,av as S,m as x,g as N,t as d,aw as P,ax as h,ay as T,j as t,Q as w,az as R,k as u}from"./index-e9211ef1.js";import{a as _,o as L,c as $,d as A,e as I,g as M,y as X,r as Y,i as j,V as z}from"./VBtn-68784d55.js";import{m as D,M as F}from"./VListItem-230d1393.js";const Q=B({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:S,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,..._(),...L({location:"top end"}),...$(),...A(),...x(),...D({transition:"scale-rotate-transition"})},"VBadge"),H=N()({name:"VBadge",inheritAttrs:!1,props:Q(),setup(e,o){const{backgroundColorClasses:c,backgroundColorStyles:g}=I(d(e,"color")),{roundedClasses:m}=M(e),{t:b}=P(),{textColorClasses:f,textColorStyles:v}=X(d(e,"textColor")),{themeClasses:C}=h(),{locationStyles:y}=Y(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 j(()=>{const a=Number(e.content),n=!e.max||isNaN(a)?e.content:a<=+e.max?a:`${e.max}+`,[k,V]=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]},V,{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(F,{transition:e.transition},{default:()=>{var i,r;return[w(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(z,{icon:e.icon},null):n]),[[R,e.modelValue]])]}})])]}})}),{}}});export{H as V};
