'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 m,getProductOfferWrapperClasses as s}from"../common/classes.js";import{createClass as a,createStyle as c}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 n}from"./ProductOfferItem.js";let f=f=>{let{styles:p,builderAttrs:u,builderProps:h,setting:P}=f,{isLoading:j,productSortedById:y,totalProduct:g}=l(),k=a({...m(h?.uid)}),v=a({...s()}),x=c({...d(p)}),O=c({...i(P)});return o(t,{children:j?o(r,{}):y?.length?o("div",{...u,className:k,style:O,children:o("div",{className:v,style:x,children:y?.map((o,t)=>e(n,{...f,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{f as default};
