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