"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("@gem-sdk/core"),s=require("../../../grid/components/ChildrenDroppable.js"),i=require("./common/styles.js"),l=require("./common/classes.js"),d=require("./common/attrs.js");exports.default=o=>{let{children:a,productSortedById:n,generateGridRowArray:c,setting:m}=o,u=t.useEditorMode(),{gridLayoutStyle:p}=i.getStyle(o),{gridLayoutClass:g,productItemClass:h}=l.getClass(o),{productListAttr:j,getAttrProductItemEditor:y}=d.getAttr(o);return e.jsx("div",{...j,style:p,className:g,children:n?.length?n?.map((i,l)=>e.jsx(t.ProductProvider,{product:i,readOnly:!0,children:e.jsx("div",{..."edit"===u?y(i?.baseID):{},className:h,style:{"--grchild":m?.sameHeight?c?.[l]?.gridRow:void 0,"--mbchild":c?.[l]?.marginBottom},children:t.isEmptyChildren(a)?e.jsx(s.default,{}):r.Children.map(a,e=>r.isValidElement(e)?r.createElement(e.type,{...e.props,key:e.key}):null)})},i?.baseID)):null})};
