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