'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/system"),r=require("./hooks/useAddToCart.js"),s=require("./common/styles.js"),d=require("./SoldOutButton.js"),l=require("./AddToCartButton.js");exports.default=u=>{let{setting:i,builderProps:o,style:a,styles:n,children:j}=u,{wrapStyle:y,restStyle:c}=s.getSplitStyle(a),{isLoading:f,isInStock:q,outOfStockLabel:x,notiComponent:m,addToCart:h,addToCartRef:p}=r.useBtnAddToCart({setting:i,styles:n,builderProps:o});return e.jsxs("div",{style:y,ref:p,children:[t.If(q,e.jsx(l.default,{...u,style:c,children:j,isLoading:f,addToCart:h}),e.jsx(d.default,{...u,style:c,children:j,label:x})),m]})};
