'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/system"),t=require("next/dynamic"),s=require("./common/classes.js"),n=require("./common/helpers.js"),o=require("./common/styles.js"),i=require("../../hooks/useShopPayButton.js");const u=t(()=>Promise.resolve().then(function(){return require("./icons/DynamicCheckoutBlack.js")})),c=t(()=>Promise.resolve().then(function(){return require("./icons/DynamicCheckoutPurple.js")})),l=t(()=>Promise.resolve().then(function(){return require("./icons/DynamicCheckoutWhite.js")})),a=t(()=>Promise.resolve().then(function(){return require("./icons/ExpressCheckoutBlack.js")})),h=t(()=>Promise.resolve().then(function(){return require("./icons/ExpressCheckoutPurple.js")})),m=t(()=>Promise.resolve().then(function(){return require("./icons/ExpressCheckoutWhite.js")}));exports.default=({style:t,styles:p,setting:j,className:y,builderAttrs:d})=>{let{variants:q,storeUrl:P,handleOnPay:k}=i.useShopPayButton(j);if(!P)return e.jsx("div",{...d,children:"URL Not Found"});let x=n.getSPButton({styles:p,buttons:{DynamicCheckoutBlack:u,DynamicCheckoutPurple:c,DynamicCheckoutWhite:l,ExpressCheckoutBlack:a,ExpressCheckoutPurple:h,ExpressCheckoutWhite:m}}),C=r.createStyle({...o.getButtonWrapperStyles(t,p)}),v=r.createClass({...s.getButtonClasses()}),f=r.createClass({...s.getButtonWrapperClasses(y)}),B=r.createAttr({disabled:!q?.length,"aria-label":"Buy with Shop Pay"});return e.jsx("div",{...d,style:C,className:f,children:e.jsx("button",{...B,className:v,onClick:()=>k({inputWidth:600,inputHeight:600}),children:e.jsx(x,{})})})};
