"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Carousel=require("../../../carousel-v3/components/root/Carousel.js"),CarouselItem=require("../../../carousel-v3/components/item/CarouselItem.js"),ChildrenDroppable=require("../../../grid/components/ChildrenDroppable.js"),helpers=require("./common/helpers.js"),attrs=require("./common/attrs.js"),styles=require("./common/styles.js"),classes=require("./common/classes.js");const ProductListCarouselLayout=e=>{let{children:s,builderProps:r,productSortedById:t,advanced:o}=e,l=core.useEditorMode(),{carouselConfigSetting:u,carouselConfigStyle:i}=helpers.getData(e),{productListAttr:a,getAttrProductItemEditor:c}=attrs.getAttr(e),{carouselItemStyle:d}=styles.getStyle(e),{carouselClass:n,productItemClass:m}=classes.getClass(e);return jsxRuntime.jsx(Carousel.default,{advanced:o,builderProps:{uid:r?.uid},rootAttrs:{...a},rootClass:n,setting:u,styles:i,isProductList:!0,children:t?.map(e=>jsxRuntime.jsx(CarouselItem.default,{style:d,children:jsxRuntime.jsx(core.ProductProvider,{product:e,readOnly:!0,children:jsxRuntime.jsx("div",{..."edit"===l?c(e?.baseID):{},className:m,children:core.isEmptyChildren(s)?jsxRuntime.jsx(ChildrenDroppable.default,{}):s})})},e?.baseID))})};exports.default=ProductListCarouselLayout;
