System.register(["./tmagic-core-legacy-_EZuz85T.js","./plugin-vueexport-helper-legacy-BYKHBkp1.js","./index-legacy-tP3UZPmW.js","./tmagic-dep-legacy-Bcp-VA6U.js"],(function(e,t){"use strict";var r,n,o,i,a,c;return{setters:[e=>{r=e.C},e=>{n=e.u,o=e.a,i=e._,a=e.b,c=e.r},null,null],execute:function(){const t=VueDemi.defineComponent({name:"tmagic-iterator-container-item",props:{config:{type:Object,required:!0},iteratorIndex:Array,iteratorContainerId:Array,containerIndex:Number,index:Number,model:{type:Object,default:()=>({})}},setup(e){const t=VueDemi.inject("app"),r=n({componentType:"container",app:t}),{style:i,className:a}=o(e);return{style:i,className:a,containerComponent:r}}}),l=i(t,[["render",function(e,t,r,n,o,i){return Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(e.containerComponent),{style:Vue.normalizeStyle(e.style),class:Vue.normalizeClass(e.className),config:e.config,"iterator-index":e.iteratorIndex,"iterator-container-id":e.iteratorContainerId},null,8,["style","class","config","iterator-index","iterator-container-id"])}]]),s=VueDemi.defineComponent({name:"tmagic-iterator-container",components:{IteratorItem:l},props:{config:{type:Object,required:!0},iteratorIndex:Array,iteratorContainerId:Array,containerIndex:Number,model:{type:Object,default:()=>({})}},setup(e){const t=VueDemi.inject("app"),n=a(e,t);c(n);const o=VueDemi.computed((()=>{let{iteratorData:r=[]}=e.config;const{itemConfig:n,dsField:o,items:i}=e.config;return Array.isArray(r)||(r=[]),"editor"!==t?.platform||r.length||r.push({}),r.map((e=>{const r="editor"===t?.platform||(t?.dataSourceManager?.compliedIteratorItemConds(e,n,o)??!0);return{items:t?.dataSourceManager?.compliedIteratorItems(e,i,o)??i,condResult:r,style:{position:"relative",left:0,top:0,...n.style}}}))}));return VueDemi.watch(o,(r=>{if(!e.config.id)return;const n=t?.getNode(e.config.id,e.iteratorContainerId,e.iteratorIndex);n&&(n.resetNodes(),r.forEach(((e,t)=>{n.setNodes(e.items,t)})))}),{immediate:!0}),{configs:o,clickHandler:()=>{t&&n&&t.emit(`${r}click`,n)}}}});e("default",i(s,[["render",function(e,t,r,n,o,i){const a=Vue.resolveComponent("IteratorItem");return Vue.openBlock(),Vue.createElementBlock("div",{onClick:t[0]||(t[0]=(...t)=>e.clickHandler&&e.clickHandler(...t))},[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(e.configs,((t,r)=>(Vue.openBlock(),Vue.createBlock(a,{key:r,config:t,"iterator-index":[...e.iteratorIndex||[],r],"iterator-container-id":e.config.id?[...e.iteratorContainerId||[],e.config.id]:[...e.iteratorContainerId||[]]},null,8,["config","iterator-index","iterator-container-id"])))),128))])}]]))}}}));
//# sourceMappingURL=IteratorContainer-legacy-cxn2hz8r.js.map
