import{p as S,ar as V,m as N,g as P,t as d,as as h,W as x,at as T,j as t,U as R,au as _,k as u}from"./index-0b85ac09.js";import{a as w,z as I,c as L,d as $,H as A,e as M,g as X,I as Y,C as j,i as z,M as D,k as F}from"./VImg-0b02a672.js";const H=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(),...A({transition:"scale-rotate-transition"})},"VBadge"),q=P()({name:"VBadge",inheritAttrs:!1,props:H(),setup(e,o){const{backgroundColorClasses:c,backgroundColorStyles:g}=M(d(e,"color")),{roundedClasses:m}=X(e),{t:b}=h(),{textColorClasses:f,textColorStyles:v}=Y(d(e,"textColor")),{themeClasses:C}=x(),{locationStyles:k}=j(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 z(()=>{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{q as V};
