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