import{a as V,q as R,d as p,s as _,n as g,S as T,i as I}from"./VImg-9fff8259.js";import{u as M}from"./resizeObserver-a1e84c0c.js";import{p as E,y as O,z as $,r as A,B,D as f,c as a,as as D,b as F,J as r}from"./index-2a796b7e.js";const U=E({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},...V(),...R(),...p({tag:"div"}),...O()},"VProgressCircular"),W=$()({name:"VProgressCircular",props:U(),setup(e,C){let{slots:u}=C;const s=20,t=2*Math.PI*s,l=A(),{themeClasses:h}=B(e),{sizeClasses:y,sizeStyles:c}=_(e),{textColorClasses:b,textColorStyles:k}=g(f(e,"color")),{textColorClasses:S,textColorStyles:w}=g(f(e,"bgColor")),{intersectionRef:x,isIntersecting:P}=T(),{resizeRef:z,contentRect:v}=M(),o=a(()=>Math.max(0,Math.min(100,parseFloat(e.modelValue)))),i=a(()=>Number(e.width)),d=a(()=>c.value?Number(e.size):v.value?v.value.width:Math.max(i.value,32)),n=a(()=>s/(1-i.value/d.value)*2),m=a(()=>i.value/d.value*n.value),N=a(()=>F((100-o.value)/100*t));return D(()=>{x.value=l.value,z.value=l.value}),I(()=>r(e.tag,{ref:l,class:["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":P.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 ${n.value} ${n.value}`},[r("circle",{class:["v-progress-circular__underlay",S.value],style:w.value,fill:"transparent",cx:"50%",cy:"50%",r:s,"stroke-width":m.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":m.value,"stroke-dasharray":t,"stroke-dashoffset":N.value},null)]),u.default&&r("div",{class:"v-progress-circular__content"},[u.default({value:o.value})])]})),{}}});export{W as V};
