import{C}from"./tmagic-core-DwMmMg7V.js";import{b as f,a as k,u as x,r as D,_ as N}from"./plugin-vueexport-helper-CYignUIG.js";import"./index-kuiGTNrJ.js";import{I as b}from"./tmagic-dep-DSKLZ87U.js";const j=VueDemi.defineComponent({name:"tmagic-container-item",props:{config:{type:Object,required:!0},index:Number,iteratorIndex:{type:Array,default:()=>[]},iteratorContainerId:{type:Array,default:()=>[]}},setup(e){const t=VueDemi.inject("userRender",({h:o,type:i,props:p={},attrs:g={},style:y,className:I,on:l,directives:m=[]})=>{const d={...p,...g,style:y,class:I};if(l)for(const[r,V]of Object.entries(l))d["on".concat(r[0].toLocaleUpperCase()).concat(r.substring(1))]=V;return m.length?VueDemi.withDirectives(o(i,d),m.map(r=>[VueDemi.resolveDirective(r.name),r.value,r.modifiers])):o(i,d)}),n=VueDemi.inject("app"),a=f(e),c=k(e);VueDemi.provide("componentStatusStore",c);const{style:s,className:u}=c;return()=>e.config.visible===!1||e.config.condResult===!1||typeof e.config.display=="function"&&e.config.display({app:n,node:a})===!1?null:t({h:VueDemi.h,config:e.config,type:x({componentType:e.config.type,app:n}),style:s.value,className:u.value,props:{config:{...e.config,[b]:!0},containerIndex:e.index,iteratorIndex:e.iteratorIndex,iteratorContainerId:e.iteratorContainerId},attrs:{"data-tmagic-id":e.config.id,"data-tmagic-iterator-index":e.iteratorIndex.join(",")||void 0,"data-tmagic-iterator-container-id":e.iteratorContainerId.join(",")||void 0,"data-container-index":e.index}})}}),v=VueDemi.defineComponent({name:"tmagic-container",props:{config:{type:Object,required:!0},iteratorIndex:{type:Array,default:()=>[]},iteratorContainerId:{type:Array,default:()=>[]},containerIndex:Number,model:{type:Object,default:()=>({})}},components:{ItemComponent:j},setup(e){const t=VueDemi.inject("app"),n=f(e,t);return D(n),{clickHandler:()=>{t&&n&&t.emit("".concat(C,"click"),n)}}}});function S(e,t,n,a,c,s){const u=Vue.resolveComponent("ItemComponent");return Vue.openBlock(),Vue.createElementBlock("div",{onClick:t[0]||(t[0]=(...o)=>e.clickHandler&&e.clickHandler(...o))},[Vue.renderSlot(e.$slots,"default",{},()=>[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(e.config.items,(o,i)=>(Vue.openBlock(),Vue.createBlock(u,{key:o.id,config:o,index:i,"iterator-index":e.iteratorIndex,"iterator-container-id":e.iteratorContainerId},null,8,["config","index","iterator-index","iterator-container-id"]))),128))])])}const B=N(v,[["render",S]]);export{B as default};
//# sourceMappingURL=Container-MR2y8QnE.js.map
