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