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