const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["component-Captcha.CD-v8tkc.js","dist-vendor.a3kfnPsb.js","esm-ShopPayCaptcha.C3IG4BoF.js","shop-pay-ButtonWithRegisterWebPixel.CUNg0UCj.js","shop-pay-FullScreenBackground.Bxb6RI8a.js","app.BwZuiz-b.js","assets/app.fH9d1Lew.css","assets/FullScreenBackground.BEEkv9BX.css","images-flag-icon.C_eXYJRt.js","images-payment-icon.BXeXx6hF.js","assets/ButtonWithRegisterWebPixel.UZxjFBtg.css","assets/Captcha.CJQgLR0i.css"])))=>i.map(i=>d[i]);
import{_ as f}from"./app.BwZuiz-b.js";import{g as k,r as B,u as e,q as w,p as x,b as A,k as W}from"./dist-vendor.a3kfnPsb.js";import{T as y,lm as M,X as m,B as D,aR as P,l as R,eO as S,ln as z,hk as I,hj as N,Z as T,lo as O,hn as j,Y as C}from"./shop-pay-ButtonWithRegisterWebPixel.CUNg0UCj.js";import{a as _,b as L}from"./shop-pay-FullScreenBackground.Bxb6RI8a.js";const V=k({load:()=>B(()=>f(()=>import("./component-Captcha.CD-v8tkc.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])))});function X({isForExpressCheckout:a=!1}){const{i18n:t,shop:{merchantPolicies:i}}=_(),n=a?"small":"generic",r=i.find(l=>l.handle==="subscription-policy"),o=e(y,{type:n,children:t.translate("payment.purchase_options_cancellation_policy_label")}),s=r?e(m,{overlay:e(M,{handle:"subscription-policy",title:t.translate("shop_policies.purchase_options_cancellation_policy")}),children:o}):o;return e(D,{id:"purchase_options_agreement",padding:a?"small-100 none none none":"none",children:e(y,{color:"subdued",type:n,children:a?t.translate("payment.purchase_options_agreement_label_wallets"):t.translate("payment.purchase_options_agreement_label",{cancellation_policy_label:s})})})}function Y({textProps:a}){const{i18n:t,shop:{name:i}}=_(),o=L().managedMarketsPaymentProcessor?.value==="shopify_payments"?"https://content.global-e.com/shopper-terms-v2":"https://content.global-e.com/shopper-terms",s={markets_pro_terms:e(m,{textDecoration:"none",overlay:e(P,{source:o,heading:t.translate("payment.markets_pro_disclaimer_terms_and_conditions_title")}),children:t.translate("payment.markets_pro_disclaimer_terms_and_conditions")}),privacy_policy:e(m,{textDecoration:"none",overlay:e(P,{source:"https://content.global-e.com/privacy-policy",heading:t.translate("payment.markets_pro_disclaimer_privacy_policy_title")}),children:t.translate("payment.markets_pro_disclaimer_privacy_policy")}),shop_name:i};return e(y,{...a,children:t.translate("payment.markets_pro_disclaimer_label",s)})}const Z=({disabled:a,loading:t,defaultLabel:i,pixelId:n})=>{const{nextPage:r}=R(),o=S(),s=r.id==="review",l=z().value,g=I(),{setPayNowButtonElement:d}=N(),b=w(u=>{o(n)(u),d(u)},[o,d,n]),h=g&&!s,c=l&&!s,p=x(!1);c&&!p.value&&(p.value=!0);const{i18n:v}=_();return e(W,{children:[e(T,{id:"checkout-pay-heading",tabIndex:-1,visibility:"hidden",children:v.translate("general.finalize_order_accessibility_label")}),e(A,{when:p,children:e(O,{disabled:a,loading:t,hidden:!c})}),h&&e(j,{disabled:a,loading:t,pixelId:n}),!c&&!h&&e(C,{id:"checkout-pay-button",variant:"primary",size:"large",type:"submit",inlineSize:"fill",loading:t,disabled:a,ref:b,children:i})]})};export{V as C,Y as M,X as P,Z as a};
