'use client';
import{jsxs as t,jsx as o}from"react/jsx-runtime";import{If as r}from"@gem-sdk/system";import{useBtnAddToCart as e}from"./hooks/useAddToCart.js";import{getSplitStyle as m}from"./common/styles.js";import s from"./SoldOutButton.js";import d from"./AddToCartButton.js";let ProductButton=i=>{let{setting:l,builderProps:n,style:u,styles:a,children:f}=i,{wrapStyle:c,restStyle:p}=m(u),{isLoading:j,isInStock:y,outOfStockLabel:h,notiComponent:B,addToCart:C,addToCartRef:T}=e({setting:l,styles:a,builderProps:n}),g=()=>o(d,{...i,style:p,children:f,isLoading:j,addToCart:C}),k=()=>o(s,{...i,style:p,children:f,label:h});return t("div",{style:c,ref:T,children:[r(y,g(),k()),B]})};export{ProductButton as default};
