import{someType as e}from"../_util/type.mjs";import{progressProps as t}from"./props.mjs";import{getSize as n}from"./utils.mjs";import{computed as r,createVNode as i,defineComponent as a}from"vue";var o=()=>({...t(),steps:Number,strokeColor:e(),trailColor:String}),s=a({compatConfig:{MODE:3},name:`Steps`,props:o(),setup(e,{slots:t}){let a=r(()=>Math.round(e.steps*((e.percent||0)/100))),o=r(()=>e.size??[e.size===`small`?2:14,e.strokeWidth||8]),s=r(()=>n(o.value,`step`,{steps:e.steps,strokeWidth:e.strokeWidth||8})),c=r(()=>{let{steps:t,strokeColor:n,trailColor:r,prefixCls:o}=e,c=[];for(let e=0;e<t;e+=1){let l=Array.isArray(n)?n[e]:n,u={[`${o}-steps-item`]:!0,[`${o}-steps-item-active`]:e<=a.value-1};c.push(i(`div`,{key:e,class:u,style:{backgroundColor:e<=a.value-1?l:r,width:`${s.value.width/t}px`,height:`${s.value.height}px`}},null))}return c});return()=>i(`div`,{class:`${e.prefixCls}-steps-outer`},[c.value,t.default?.()])}});export{s as default,o as stepsProps};