const e=require("../_util/type.js"),t=require("../_util/classNames.js"),n=require("../_util/props-util/index.js"),r=require("../_util/vue-types/index.js"),i=require("../_util/vnode.js"),a=require("./Step.js");let o=require("vue");var s=(0,o.defineComponent)({compatConfig:{MODE:3},name:`Steps`,props:{type:r.default.string.def(`default`),prefixCls:r.default.string.def(`vc-steps`),iconPrefix:r.default.string.def(`vc`),direction:r.default.string.def(`horizontal`),labelPlacement:r.default.string.def(`horizontal`),status:e.stringType(`process`),size:r.default.string.def(``),progressDot:r.default.oneOfType([r.default.looseBool,r.default.func]).def(void 0),initial:r.default.number.def(0),current:r.default.number.def(0),items:r.default.array.def(()=>[]),icons:r.default.shape({finish:r.default.any,error:r.default.any}).loose,stepIcon:e.functionType(),isInline:r.default.looseBool,itemRender:e.functionType()},emits:[`change`],setup(e,{slots:r,emit:s}){let c=t=>{let{current:n}=e;n!==t&&s(`change`,t)},l=(t,n,i)=>{let{prefixCls:s,iconPrefix:l,status:u,current:d,initial:f,icons:p,stepIcon:m=r.stepIcon,isInline:h,itemRender:g,progressDot:_=r.progressDot}=e,v=h||_,y={...t,class:``},b=f+n,x={active:b===d,stepNumber:b+1,stepIndex:b,key:b,prefixCls:s,iconPrefix:l,progressDot:v,stepIcon:m,icons:p,onStepClick:c};return u===`error`&&n===d-1&&(y.class=`${s}-next-error`),y.status||(b===d?y.status=u:b<d?y.status=`finish`:y.status=`wait`),h&&(y.icon=void 0,y.subTitle=void 0),i?i({...y,...x}):(g&&(y.itemRender=e=>g(y,e)),(0,o.createVNode)(a.default,{...y,...x,__legacy:!1},null))},u=(e,t)=>l({...e.props},t,t=>i.cloneElement(e,t));return()=>{let{prefixCls:i,direction:a,type:s,labelPlacement:c,iconPrefix:d,status:f,size:p,current:m,progressDot:h=r.progressDot,initial:g,icons:_,items:v,isInline:y,itemRender:b,...x}=e,S=s===`navigation`,C=y||h,w=y?`horizontal`:a,T=y?void 0:p,E=C?`vertical`:c;return(0,o.createVNode)(`div`,{class:t.default(i,`${i}-${a}`,{[`${i}-${T}`]:T,[`${i}-label-${E}`]:w===`horizontal`,[`${i}-dot`]:!!C,[`${i}-navigation`]:S,[`${i}-inline`]:y}),...x},[v.filter(e=>e).map((e,t)=>l(e,t)),n.filterEmpty(r.default?.()).map(u)])}}});exports.default=s;