import{defineComponent as h,computed as r,createVNode as o}from"vue";import D from"@ant-design/icons-vue/CheckOutlined";import I from"@ant-design/icons-vue/CloseOutlined";import z from"../_util/classNames.mjs";import R from"../_util/hooks/useBreakpoint.mjs";import W from"../_util/omit.mjs";import j from"../_util/props-util/initDefaultProps.mjs";import{functionType as g,stringType as i,someType as A,arrayType as V,booleanType as w}from"../_util/type.mjs";import B from"../config-provider/hooks/useConfigInject.mjs";import E from"../progress/index.mjs";import{useToken as H}from"../theme/internal.mjs";import M from"../tooltip/index.mjs";import F,{VcStepProps as G}from"../vc-steps/Step.mjs";import L from"../vc-steps/Steps.mjs";import U from"./style/index.mjs";const q=()=>({prefixCls:String,iconPrefix:String,current:Number,initial:Number,percent:Number,responsive:w(),items:V(),labelPlacement:i(),status:i(),size:i(),direction:i(),progressDot:A([Boolean,Function]),type:i(),onChange:g(),"onUpdate:current":g()}),m=h({compatConfig:{MODE:3},name:"ASteps",inheritAttrs:!1,props:j(q(),{current:0,responsive:!0,labelPlacement:"horizontal"}),slots:Object,setup(e,{attrs:p,slots:P,emit:f}){const{prefixCls:t,direction:C,configProvider:S}=B("steps",e),[x,y]=U(t),[,d]=H(),b=R(),T=r(()=>e.responsive&&b.value.xs?"vertical":e.direction),N=r(()=>S.getPrefixCls("",e.iconPrefix)),O=n=>{f("update:current",n),f("change",n)},c=r(()=>e.type==="inline"),v=r(()=>c.value?void 0:e.percent),$=({node:n,status:l})=>{if(l==="process"&&e.percent!==void 0){const s=e.size==="small"?d.value.controlHeight:d.value.controlHeightLG;return o("div",{class:`${t.value}-progress-icon`},[o(E,{type:"circle",percent:v.value,size:s,strokeWidth:4,format:()=>null},null),n])}return n},k=r(()=>({finish:o(D,{class:`${t.value}-finish-icon`},null),error:o(I,{class:`${t.value}-error-icon`},null)}));return()=>{const n=z({[`${t.value}-rtl`]:C.value==="rtl",[`${t.value}-with-progress`]:v.value!==void 0},p.class,y.value),l=(s,a)=>s.description?o(M,{title:s.description},{default:()=>[a]}):a;return x(o(L,{icons:k.value,...p,...W(e,["percent","responsive"]),items:e.items,direction:T.value,prefixCls:t.value,iconPrefix:N.value,class:n,onChange:O,isInline:c.value,itemRender:c.value?l:void 0},{stepIcon:$,...P}))}}}),u=h({compatConfig:{MODE:3},...F,name:"AStep",props:G()}),le=Object.assign(m,{Step:u,install:e=>(e.component(m.name,m),e.component(u.name,u),e)});export{u as Step,le as default,q as stepsProps};
