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