const e=require("../_util/type.js"),t=require("../_util/props-util/initDefaultProps.js"),n=require("../tooltip/index.js"),r=require("../vc-progress/src/Circle.js"),i=require("./props.js"),a=require("./utils.js");let o=require("vue");var s=()=>({...i.progressProps(),strokeColor:e.anyType()}),c=3,l=e=>c/e*100,u=(0,o.defineComponent)({compatConfig:{MODE:3},name:`ProgressCircle`,inheritAttrs:!1,props:t.default(s(),{trailColor:null}),setup(e,{slots:t,attrs:i}){let s=(0,o.computed)(()=>e.width??120),c=(0,o.computed)(()=>e.size??[s.value,s.value]),u=(0,o.computed)(()=>a.getSize(c.value,`circle`)),d=(0,o.computed)(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type===`dashboard`)return 75}),f=(0,o.computed)(()=>({width:`${u.value.width}px`,height:`${u.value.height}px`,fontSize:`${u.value.width*.15+6}px`})),p=(0,o.computed)(()=>e.strokeWidth??Math.max(l(u.value.width),6)),m=(0,o.computed)(()=>e.gapPosition||e.type===`dashboard`&&`bottom`||void 0),h=(0,o.computed)(()=>a.getPercentage(e)),g=(0,o.computed)(()=>Object.prototype.toString.call(e.strokeColor)===`[object Object]`),_=(0,o.computed)(()=>a.getStrokeColor({success:e.success,strokeColor:e.strokeColor})),v=(0,o.computed)(()=>({[`${e.prefixCls}-inner`]:!0,[`${e.prefixCls}-circle-gradient`]:g.value}));return()=>{let a=(0,o.createVNode)(r.default,{percent:h.value,strokeWidth:p.value,trailWidth:p.value,strokeColor:_.value,strokeLinecap:e.strokeLinecap,trailColor:e.trailColor,prefixCls:e.prefixCls,gapDegree:d.value,gapPosition:m.value},null);return(0,o.createVNode)(`div`,{...i,class:[v.value,i.class],style:[i.style,f.value]},[u.value.width<=20?(0,o.createVNode)(n.default,null,{default:()=>[(0,o.createVNode)(`span`,null,[a])],title:t.default}):(0,o.createVNode)(o.Fragment,null,[a,t.default?.()])])}}});exports.circleProps=s,exports.default=u;