const e=require("../_util/util.js"),t=require("../_util/classNames.js"),n=require("../locale/en_US.js"),r=require("../locale/LocaleReceiver.js"),i=require("../button/index.js"),a=require("./interface.js");let o=require("vue"),s=require("@antsoo-lib/icons");var c=(0,o.defineComponent)({name:`ATourPanel`,inheritAttrs:!1,props:a.tourStepProps(),setup(a,{attrs:c,slots:l}){let{current:u,total:d}=(0,o.toRefs)(a),f=(0,o.computed)(()=>u.value===d.value-1),p=e=>{let t=a.prevButtonProps;a.onPrev?.(e),typeof t?.onClick==`function`&&t?.onClick()},m=e=>{let t=a.nextButtonProps;f.value?a.onFinish?.(e):a.onNext?.(e),typeof t?.onClick==`function`&&t?.onClick()};return()=>{let{prefixCls:h,title:g,onClose:_,cover:v,description:y,type:b,arrow:x}=a,S=a.prevButtonProps,C=a.nextButtonProps,w;g&&(w=(0,o.createVNode)(`div`,{class:`${h}-header`},[(0,o.createVNode)(`div`,{class:`${h}-title`},[g])]));let T;y&&(T=(0,o.createVNode)(`div`,{class:`${h}-description`},[y]));let E;v&&(E=(0,o.createVNode)(`div`,{class:`${h}-cover`},[v]));let D;D=l.indicatorsRender?l.indicatorsRender({current:u.value,total:d}):[...Array.from({length:d.value}).keys()].map((e,n)=>(0,o.createVNode)(`span`,{key:e,class:t.default(n===u.value&&`${h}-indicator-active`,`${h}-indicator`)},null));let O=b===`primary`?`default`:`primary`,k={type:`default`,ghost:b===`primary`};return(0,o.createVNode)(r.default,{componentName:`Tour`,defaultLocale:n.default.Tour},{default:n=>(0,o.createVNode)(`div`,{...c,class:t.default(b===`primary`?`${h}-primary`:``,c.class,`${h}-content`)},[x&&(0,o.createVNode)(`div`,{class:`${h}-arrow`,key:`arrow`},null),(0,o.createVNode)(`div`,{class:`${h}-inner`},[(0,o.createVNode)(s.CloseOutlined,{class:`${h}-close`,onClick:_},null),E,w,T,(0,o.createVNode)(`div`,{class:`${h}-footer`},[d.value>1&&(0,o.createVNode)(`div`,{class:`${h}-indicators`},[D]),(0,o.createVNode)(`div`,{class:`${h}-buttons`},[u.value===0?null:(0,o.createVNode)(i.default,{...k,...S,onClick:p,size:`small`,class:t.default(`${h}-prev-btn`,S?.className)},{default:()=>[e.isFunction(S?.children)?S.children():S?.children??n.Previous]}),(0,o.createVNode)(i.default,{type:O,...C,onClick:m,size:`small`,class:t.default(`${h}-next-btn`,C?.className)},{default:()=>[e.isFunction(C?.children)?C?.children():f.value?n.Finish:n.Next]})])])])])})}}});exports.default=c;