"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("./symbol.js"),E=require("./types.js"),n=require("element-plus"),N=require("../../node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.4.21/node_modules/@element-plus/icons-vue/dist/index.js"),x=e.createElementVNode("div",{style:{width:"100%",height:"100%"}},null,-1),w={key:1},g={class:"actions-btnbox"},i=8,b=e.defineComponent({name:"WetGuide",__name:"index",props:E.wetGuideProps,emits:["update:modelValue"],setup(v,{emit:f}){const l=n.useNamespace("guide"),m=f,a=v,o=e.shallowRef(0),p={},s=e.computed(()=>{const t={...p};return Object.values(t).filter(u=>u!==null).sort((u,c)=>u.value.order-c.value.order)}),k=e.computed(()=>{const t=s.value[o.value];return t?{width:t.value.width+i+"px",height:t.value.height+i+"px",top:t.value.top-i/2+"px",left:t.value.left-i/2+"px"}:{}}),r=e.computed(()=>{const t=s.value[o.value];return console.log(t),{description:t.value.description||"",title:t.value.title||"",placement:t.value.placement}});let d=e.shallowRef(!1);const h=()=>{d.value=!1,setTimeout(()=>{d.value=!0},100)};e.watch([()=>a.modelValue,o],h);const V=()=>{o.value--},_=()=>{if(o.value===s.value.length-1){m("update:modelValue",!1),o.value=0;return}o.value++},y=()=>{o.value=0,m("update:modelValue",!1)};return e.provide(B.SymbolState,p),(t,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(t.$slots,"default"),a.modelValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(l).e("gide-mask"))},null,2)):e.createCommentVNode("",!0),a.modelValue?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(l).b(),e.unref(l).is("mask",a.mask)]),style:e.normalizeStyle(k.value)},[e.unref(d)?(e.openBlock(),e.createBlock(e.unref(n.ElPopover),{key:0,"popper-class":a.mask?e.unref(l).e("mask-popover"):e.unref(l).e("popover"),visible:!0,width:"auto",teleported:!1,placement:r.value.placement},{reference:e.withCtx(()=>[x]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([e.unref(l).e("header"),e.unref(l).is("mask",a.mask)])},[e.createElementVNode("div",null,e.toDisplayString(r.value.title),1),e.createVNode(e.unref(n.ElButton),{link:""},{default:e.withCtx(()=>[e.createVNode(e.unref(n.ElIcon),{class:"close",onClick:y},{default:e.withCtx(()=>[e.createVNode(e.unref(N.Close))]),_:1})]),_:1})],2),e.createElementVNode("div",{class:e.normalizeClass([e.unref(l).e("description"),e.unref(l).is("mask",a.mask)])},[typeof r.value.description!="string"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value.description),{key:0})):(e.openBlock(),e.createElementBlock("div",w,e.toDisplayString(r.value.description),1))],2),e.createElementVNode("div",{class:e.normalizeClass([e.unref(l).e("footer")])},[e.createVNode(e.unref(n.ElSpace),{class:"index-dots"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(u,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["index-dot",e.unref(l).is("mask",a.mask),e.unref(l).is("active",c<=o.value)]),key:c},null,2))),128))]),_:1}),e.createElementVNode("div",g,[e.createVNode(e.unref(n.ElButton),{plain:!a.mask,size:"small",disabled:o.value===0,click:"previous",onClick:V},{default:e.withCtx(()=>[e.createTextVNode("上一步 ")]),_:1},8,["plain","disabled"]),e.createVNode(e.unref(n.ElButton),{size:"small",type:a.mask?"primary":"",onClick:_},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.value===s.value.length-1?"完成":"下一步"),1)]),_:1},8,["type"])])],2)]),_:1},8,["popper-class","placement"])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)],64))}});exports.default=b;
