import{iD as b,bE as O,cX as k,bl as v,gn as E,bo as I,a0 as A,f$ as B,du as L,ht as w,Y as l,qf as F,qg as T,bk as Y,qh as q,eO as D,qi as G,au as M,qj as U,c$ as V,qk as H,bI as K,i as x,fv as N,a as r,aC as p,E as $}from"./app.DGBnFLnj.js";function j(){const e=b(),{purchasingCompany:t}=O(),a=k(),{checkoutSessionIdentifier:o=""}=v(),s=E(),h=I(),d=A().paymentLines.value,{value:n}=B(),{currentDetour:y}=L(),P=w(),u=l(F),i=l(T),{shopPayEnabled:S}=Y(),{hasSavedCreditCards:_}=q(),c=D(),{value:m}=G(),g=M().searchParams.get(U),C=V().isStandard();return P?.shopPayOptInEnabled===!1||t||!S||a?.__typename==="CustomerProfile"&&s&&(!h||!_)||H(o)||e||g||m||C?!1:y?.type==="thankYou"?n?f({paymentLines:n.lines,isIdealEnabledForShopPay:c,isBogusFlagEnabled:u,isCryptoFlagEnabled:i}):!1:f({paymentLines:d,isIdealEnabledForShopPay:c,isBogusFlagEnabled:u,isCryptoFlagEnabled:i})}const f=({paymentLines:e,isIdealEnabledForShopPay:t,isBogusFlagEnabled:a,isCryptoFlagEnabled:o})=>{if(!e?.length||!e[0].method)return!1;const{method:s}=e[0];return s.type==="customOnsite"?!!(a&&s.paymentBrands?.includes("bogus_app_coin")||o&&s.paymentBrands?.includes("usdc")):!!(s.type==="direct"||s.type===K.CreditCard||t&&s.type==="local"&&s.name==="IDEAL")};function z(){const e=x(),{isOptedIn:t}=N();return!j()||!t?null:r($,{color:"subdued",children:e("shop_pay.checkout.sign_up_footer.button_footer",{privacy_href:r(p,{target:"_blank",href:"https://www.shopify.com/legal/privacy/app-users",children:e("shop_pay.checkout.sign_up_footer.privacy_policy","Privacy Policy")}),terms_href:r(p,{target:"_blank",href:"https://shop.app/terms-of-service",children:e("shop_pay.checkout.sign_up_footer.terms_of_service","Terms of Service")})},"Your info will be saved to a Shop account. By continuing, you agree to Shop’s %{terms_href} and acknowledge the %{privacy_href}.")})}export{z as S,j as u};