import{jsx as o}from"react/jsx-runtime";import{useEditorMode as r,ProductProvider as t,isEmptyChildren as s}from"@gem-sdk/core";import e from"../../../carousel-v3/components/root/Carousel.js";import m from"../../../carousel-v3/components/item/CarouselItem.js";import i from"../../../grid/components/ChildrenDroppable.js";import{getData as l}from"./common/helpers.js";import{getAttr as a}from"./common/attrs.js";import{getStyle as c}from"./common/styles.js";import{getClass as d}from"./common/classes.js";let ProductListCarouselLayout=n=>{let{children:p,builderProps:u,productSortedById:f,advanced:j}=n,h=r(),{carouselConfigSetting:y,carouselConfigStyle:C}=l(n),{productListAttr:L,getAttrProductItemEditor:b}=a(n),{carouselItemStyle:v}=c(n),{carouselClass:P,productItemClass:g}=d(n);return o(e,{advanced:j,builderProps:{uid:u?.uid},rootAttrs:{...L},rootClass:P,setting:y,styles:C,isProductList:!0,children:f?.map(r=>o(m,{style:v,children:o(t,{product:r,readOnly:!0,children:o("div",{..."edit"===h?b(r?.baseID):{},className:g,children:s(p)?o(i,{}):p})})},r?.baseID))})};export{ProductListCarouselLayout as default};
