import{m as p,r as z,b as R,t as _,o as g,O as T,c as I}from"./transition-cd9cc606.js";import{u as M}from"./resizeObserver-5499429a.js";import{p as O,v as E,l as $,r as A,N as F,y as f,c as a,ap as U,b as B,m as r}from"./index-5ee1411a.js";const D=O({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},...p(),...z(),...R({tag:"div"}),...E()},"VProgressCircular"),q=$()({name:"VProgressCircular",props:D(),setup(e,C){let{slots:n}=C;const s=20,t=2*Math.PI*s,l=A(),{themeClasses:h}=F(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:N}=T(),{resizeRef:P,contentRect:v}=M(),o=a(()=>Math.max(0,Math.min(100,parseFloat(e.modelValue)))),u=a(()=>Number(e.width)),m=a(()=>c.value?Number(e.size):v.value?v.value.width:Math.max(u.value,32)),i=a(()=>s/(1-u.value/m.value)*2),d=a(()=>u.value/m.value*i.value),V=a(()=>B((100-o.value)/100*t));return U(()=>{x.value=l.value,P.value=l.value}),I(()=>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 ${i.value} ${i.value}`},[r("circle",{class:["v-progress-circular__underlay",S.value],style:w.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":V.value},null)]),n.default&&r("div",{class:"v-progress-circular__content"},[n.default({value:o.value})])]})),{}}});export{q as V};
