"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime");require("react");var Button=require("../../../button/components/Button.js"),system=require("@gem-sdk/system"),data=require("./common/data.js"),classes=require("./common/classes.js"),ProductButtonPrice=require("./ProductButtonPrice.js");const AddToCartButton=t=>{let{children:e,addToCart:s,...r}=t,{styles:a,setting:o,advanced:u,builderProps:n,builderAttrs:d}=r,{buttonStyle:i,buttonStyles:c,getButtonSettings:l}=data.getAddToCartButtonData(r),m=system.createClass(classes.getAddToCartButtonClasses({isDisabled:r?.isLoading})),j=l(),B=jsxRuntime.jsx(ProductButtonPrice.default,{setting:o,styles:a});return jsxRuntime.jsx(Button.default,{style:i,advanced:u,nodePrice:B,styles:c,setting:j,className:m,builderProps:n,builderAttrs:{...d,"data-is-in-stock":!0},onClick:s,children:e})};exports.default=AddToCartButton;
