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