'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../../../../../common/components/Loading.js");require("@gem-sdk/core");var s=require("../common/classes.js"),a=require("@gem-sdk/system"),o=require("../common/styles.js"),c=require("../hooks/useProductOfferData.js"),u=require("./ProductOfferItem.js");exports.default=l=>{let{styles:d,builderAttrs:i,builderProps:n,setting:m}=l,{isLoading:f,productSortedById:p,totalProduct:j}=c.useProductOfferData(),y=a.createClass({...s.getProductOfferContainerClasses(n?.uid)}),g=a.createClass({...s.getProductOfferWrapperClasses()}),q=a.createStyle({...o.getWrapperStyles(d)}),x=a.createStyle({...o.getContainerStyles(m)});return e.jsx(e.Fragment,{children:f?e.jsx(t.default,{}):p?.length?e.jsx("div",{...i,className:y,style:x,children:e.jsx("div",{className:g,style:q,children:p?.map((e,t)=>r.createElement(u.ProductOfferItem,{...l,product:e,index:t,key:t,totalProduct:j}))})}):e.jsx("div",{children:"You haven't set up a product yet. Please go back to the sales funnel details to add a product."})})};
