'use client';
"use strict";var e=require("react/jsx-runtime"),r=require("@gem-sdk/core");require("react");var t=require("../../../../../grid/components/row/Row.js"),s=require("../../../../../grid/components/ChildrenDroppable.js"),i=require("@gem-sdk/system"),d=require("../common/attrs.js"),a=require("../common/classes.js");exports.ProductOfferItem=c=>{let{product:l,setting:u,builderProps:o,children:n,index:m,totalProduct:j,builderAttrs:f,styles:q}=c,g=r.useEditorMode(),{variantSelected:h,productOfferLayout:p,layout:x,...v}=u??{};Object.keys(x||{}).forEach(e=>{p?.[e]==="2col"&&x?.[e]&&(x[e].display="fill")});let y=h?.[l?.baseID??""]?.variantId,I=i.createAttr({...d.getProductOfferAttrs(l,o?.uid)}),O=i.createClass({...a.getProductOfferItemClasses(m,u,j)});return e.jsx("div",{className:O,children:e.jsx(r.ProductProvider,{product:l,readOnly:!0,initialVariantId:y??"Latest",uid:o?.uid,children:e.jsx("div",{..."edit"===g?{...I}:{},children:e.jsx(t.default,{builderAttrs:f,setting:{...v,layout:x},styles:q,children:r.isEmptyChildren(n)?e.jsx(s.default,{}):n})})})},`uid-${l?.id}`)};
