import{jsx as o}from"react/jsx-runtime";import{useEditorMode as r,ProductProvider as t,isEmptyChildren as e}from"@gem-sdk/core";import s from"../../../carousel/components/root/Carousel.js";import m from"../../../carousel/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 n}from"./common/classes.js";let ProductListCarouselLayout=d=>{let{children:p,builderProps:u,productSortedById:f,advanced:j}=d,h=r(),{carouselConfigSetting:y,carouselConfigStyle:C}=l(d),{productListAttr:b,getAttrProductItemEditor:L}=a(d),{carouselItemStyle:g}=c(d),{carouselClass:D,productItemClass:I}=n(d);return o(s,{advanced:j,builderProps:{uid:u?.uid},rootAttrs:{...b},rootClass:D,setting:y,styles:C,children:f?.map(r=>o(m,{style:g,children:o(t,{product:r,readOnly:!0,children:o("div",{..."edit"===h?L(r?.baseID):{},className:I,children:e(p)?o(i,{}):p})})},r?.baseID))})};export{ProductListCarouselLayout as default};
