import{defineComponent as h,computed as r,createVNode as o}from"vue";import{CloseOutlined as D,CheckOutlined as I}from"@antsoo-lib/icons";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()}),u=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:n,direction:C,configProvider:S}=B("steps",e),[x,y]=U(n),[,d]=H(),b=R(),T=r(()=>e.responsive&&b.value.xs?"vertical":e.direction),N=r(()=>S.getPrefixCls("",e.iconPrefix)),O=t=>{f("update:current",t),f("change",t)},c=r(()=>e.type==="inline"),v=r(()=>c.value?void 0:e.percent),$=({node:t,status:l})=>{if(l==="process"&&e.percent!==void 0){const s=e.size==="small"?d.value.controlHeight:d.value.controlHeightLG;return o("div",{class:`${n.value}-progress-icon`},[o(E,{type:"circle",percent:v.value,size:s,strokeWidth:4,format:()=>null},null),t])}return t},k=r(()=>({finish:o(I,{class:`${n.value}-finish-icon`},null),error:o(D,{class:`${n.value}-error-icon`},null)}));return()=>{const t=z({[`${n.value}-rtl`]:C.value==="rtl",[`${n.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:n.value,iconPrefix:N.value,class:t,onChange:O,isInline:c.value,itemRender:c.value?l:void 0},{stepIcon:$,...P}))}}}),m=h({compatConfig:{MODE:3},...F,name:"AStep",props:G()}),ce=Object.assign(u,{Step:m,install:e=>(e.component(u.name,u),e.component(m.name,m),e)});export{m as Step,ce as default,q as stepsProps};
