import"./index-kuiGTNrJ.js";import{I as d}from"./tmagic-dep-DSKLZ87U.js";import{u as f,b as p,r as y,_ as V}from"./plugin-vueexport-helper-CYignUIG.js";const _=VueDemi.defineComponent({name:"tmagic-overlay",props:{config:{type:Object,required:!0},iteratorIndex:Array,iteratorContainerId:Array,containerIndex:Number,model:{type:Object,default:()=>({})}},setup(o){var u;const n=VueDemi.ref(!1),e=VueDemi.inject("app"),a=f({componentType:"container",app:e}),t=()=>{n.value=!0,e==null||e.emit("overlay:open",i)},r=()=>{n.value=!1,e==null||e.emit("overlay:close",i)},c=(s,l)=>{l.find(m=>m.id===o.config.id)?t():r()};(u=e==null?void 0:e.page)==null||u.on("editor:select",c),VueDemi.onBeforeUnmount(()=>{var s;(s=e==null?void 0:e.page)==null||s.off("editor:select",c)});const i=p(o,e);return y(i,{openOverlay:t,closeOverlay:r}),{containerComponent:a,visible:n,IS_DSL_NODE_KEY:d}}});function v(o,n,e,a,t,r){return o.visible?(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(o.containerComponent),{key:0,config:{items:o.config.items,[o.IS_DSL_NODE_KEY]:!1}},{default:Vue.withCtx(()=>[Vue.renderSlot(o.$slots,"default")]),_:3},8,["config"])):Vue.createCommentVNode("",!0)}const b=V(_,[["render",v]]);export{b as default};
//# sourceMappingURL=index-BFrI4YtT.js.map
