import{defineComponent as A,toRefs as I,computed as S,createVNode as o}from"vue";import $ from"../_util/classNames.mjs";import b from"../_util/placements.mjs";import{withInstall as j}from"../_util/type.mjs";import M from"../config-provider/hooks/useConfigInject.mjs";import O from"../vc-tour/Tour.mjs";import{tourProps as V}from"./interface.mjs";import k from"./panelRender.mjs";import q from"./style/index.mjs";import z from"./useMergedType.mjs";const B=A({name:"ATour",inheritAttrs:!1,props:V(),setup(r,{attrs:a,emit:n,slots:s}){const{current:u,type:l,steps:m,defaultCurrent:i}=I(r),{prefixCls:t,direction:c}=M("tour",r),[p,d]=q(t),{currentMergedType:f,updateInnerCurrent:C}=z({defaultType:l,steps:m,current:u,defaultCurrent:i});return()=>{const{steps:y,current:g,type:v,rootClassName:P,...h}=r,R=$({[`${t.value}-primary`]:f.value==="primary",[`${t.value}-rtl`]:c.value==="rtl"},d.value,P),T=(e,x)=>o(k,{...e,type:v,current:x},{indicatorsRender:s.indicatorsRender}),N=e=>{C(e),n("update:current",e),n("change",e)},w=S(()=>b({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return p(o(O,{...a,...h,rootClassName:R,prefixCls:t.value,current:g,defaultCurrent:r.defaultCurrent,animated:!0,renderPanel:T,onChange:N,steps:y,builtinPlacements:w.value},null))}}}),W=j(B);export{W as default};
