import{q as R,x as g,O as V,a as p,m as _,v as T,c as I}from"./transition-BAtvBeuS.js";import{u as M}from"./resizeObserver-BoHHG32A.js";import{l as O,p as A,r as E,N as F,x as f,c as a,b as U,an as $,A as B,m as r}from"./index-Cp3-A7ao.js";const D=A({bgColor:String,color:String,indeterminate:[Boolean,String],modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...I(),...T(),..._({tag:"div"}),...B()},"VProgressCircular"),j=O()({name:"VProgressCircular",props:D(),setup(e,C){let{slots:i}=C;const s=20,t=2*Math.PI*s,l=E(),{themeClasses:h}=F(e),{sizeClasses:y,sizeStyles:c}=R(e),{textColorClasses:b,textColorStyles:k}=g(f(e,"color")),{textColorClasses:x,textColorStyles:S}=g(f(e,"bgColor")),{intersectionRef:w,isIntersecting:N}=V(),{resizeRef:P,contentRect:v}=M(),o=a(()=>Math.max(0,Math.min(100,parseFloat(e.modelValue)))),n=a(()=>Number(e.width)),m=a(()=>c.value?Number(e.size):v.value?v.value.width:Math.max(n.value,32)),u=a(()=>s/(1-n.value/m.value)*2),d=a(()=>n.value/m.value*u.value),z=a(()=>U((100-o.value)/100*t));return $(()=>{w.value=l.value,P.value=l.value}),p(()=>r(e.tag,{ref:l,class:["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":N.value,"v-progress-circular--disable-shrink":e.indeterminate==="disable-shrink"},h.value,y.value,b.value,e.class],style:[c.value,k.value,e.style],role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:o.value},{default:()=>[r("svg",{style:{transform:`rotate(calc(-90deg + ${Number(e.rotate)}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${u.value} ${u.value}`},[r("circle",{class:["v-progress-circular__underlay",x.value],style:S.value,fill:"transparent",cx:"50%",cy:"50%",r:s,"stroke-width":d.value,"stroke-dasharray":t,"stroke-dashoffset":0},null),r("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r:s,"stroke-width":d.value,"stroke-dasharray":t,"stroke-dashoffset":z.value},null)]),i.default&&r("div",{class:"v-progress-circular__content"},[i.default({value:o.value})])]})),{}}});export{j as V};
