const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["component-Captcha.CaTBFWVv.js","app.owqgWGYv.js","assets/app.CETVp4gZ.css","ShopPayCaptcha.B1YjIDNq.js","assets/Captcha.CJQgLR0i.css"])))=>i.map(i=>d[i]); import{sg as m,px as g,_ as b,e as B,aR as w,a as e,a6 as h,sh as f,bP as v,d as A,s as W,dK as S,si as x,mL as R,mJ as T,q as z,gC as I,sj as L,mO as N,aA as O,n as j}from"./app.owqgWGYv.js";const D=m({load:()=>g(()=>b(()=>import("./component-Captcha.CaTBFWVv.js"),__vite__mapDeps([0,1,2,3,4])))});function M({isForExpressCheckout:t=!1}){const a=B(),{merchantPolicies:l}=w(),n=t?"small":"generic",i=l?.find(c=>c.handle==="subscription-policy"),s=e(h,{type:n,children:a("payment.purchase_options_cancellation_policy_label")}),o=i?e(v,{overlay:e(f,{handle:"subscription-policy",title:a("shop_policies.purchase_options_cancellation_policy")}),children:s}):s;return e(A,{id:"purchase_options_agreement",padding:t?["small100","none","none","none"]:"none",children:e(h,{color:"subdued",type:n,children:t?a("payment.purchase_options_agreement_label_wallets"):a("payment.purchase_options_agreement_label",{cancellation_policy_label:o})})})}const V=({disabled:t,loading:a,defaultLabel:l,pixelId:n})=>{const{nextPage:i}=W(),s=S(),o=i.id==="review",c=x(),_=R(),{setPayNowButtonElement:u}=T(),d=z(y=>{s(n)(y),u(y)},[s,u,n]),P=_&&!o,r=c&&!o,p=I(!1);return r&&!p.value&&(p.value=!0),e(j,{children:[p.value&&e(L,{disabled:t,loading:a,hidden:!r}),P&&e(N,{disabled:t,loading:a,pixelId:n}),!r&&!P&&e(O,{variant:"primary",size:"large",type:"submit",inlineSize:"fill",loading:a,disabled:t,ref:d,children:l})]})};export{D as C,M as P,V as a};