import{jsx as t}from"react/jsx-runtime";import"react";import o from"../../../button/components/Button.js";import{createClass as r}from"@gem-sdk/system";import{getAddToCartButtonData as s}from"./common/data.js";import{getAddToCartButtonClasses as e}from"./common/classes.js";import i from"./ProductButtonPrice.js";let AddToCartButton=m=>{let{children:n,addToCart:a,...d}=m,{styles:c,setting:l,advanced:u,builderProps:p,builderAttrs:f}=d,{buttonStyle:j,buttonStyles:b,getButtonSettings:g}=s(d),y=r(e({isDisabled:d?.isLoading})),B=g(),P=t(i,{setting:l,styles:c});return t(o,{style:j,advanced:u,nodePrice:P,styles:b,setting:B,className:y,builderProps:p,builderAttrs:{...f,"data-is-in-stock":!0},onClick:a,children:n})};export{AddToCartButton as default};
