import{p as S,aD as V,m as N,g as P,t as d,aE as h,W as x,aF as T,j as t,U as w,aG as R,k as u}from"./index-ebe4cd91.js";import{a as _,w as F,c as L,d as $,E as j,e as A,g as D,F as E,z as I,i as M,M as X,j as Y}from"./VImg-b5692565.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,..._(),...F({location:"top end"}),...L(),...$(),...N(),...j({transition:"scale-rotate-transition"})},"VBadge"),W=P()({name:"VBadge",inheritAttrs:!1,props:z(),setup(e,o){const{backgroundColorClasses:c,backgroundColorStyles:g}=A(d(e,"color")),{roundedClasses:m}=D(e),{t:b}=h(),{textColorClasses:f,textColorStyles:v}=E(d(e,"textColor")),{themeClasses:C}=x(),{locationStyles:k}=I(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 M(()=>{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(X,{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?{}: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(Y,{icon:e.icon},null):n]),[[R,e.modelValue]])]}})])]}})}),{}}});export{W as V};
