import{iA as b,bE as k,cW as O,bu as v,gk as E,bl as A,a0 as I,fY as w,dt as B,hq as L,Y as l,pv as F,pw as T,bk as Y,qh as q,eN as D,qi as G,ay as M,qj as U,c_ as V,qk as H,bI as K,i as N,fs as x,a as r,aC as p,E as j}from"./app.B7V4PU1H.js";function J(){const e=b(),{purchasingCompany:t}=k(),a=O(),{checkoutSessionIdentifier:o=""}=v(),s=E(),f=A(),d=I().paymentLines.value,{value:n}=w(),{currentDetour:y}=B(),P=L(),u=l(F),i=l(T),{shopPayEnabled:_}=Y(),{hasSavedCreditCards:S}=q(),c=D(),{value:m}=G(),g=M().searchParams.get(U),C=V().isStandard();return P?.shopPayOptInEnabled===!1||t||!_||a?.__typename==="CustomerProfile"&&s&&(!f||!S)||H(o)||e||g||m||C?!1:y?.type==="thankYou"?n?h({paymentLines:n.lines,isIdealEnabledForShopPay:c,isBogusFlagEnabled:u,isCryptoFlagEnabled:i}):!1:h({paymentLines:d,isIdealEnabledForShopPay:c,isBogusFlagEnabled:u,isCryptoFlagEnabled:i})}const h=({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 Q(){const e=N(),{isOptedIn:t}=x();return!J()||!t?null:r(j,{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{Q as S,J as u};