import{iB as b,bE as O,cW as k,bu as v,gl as E,bl as I,a0 as A,fZ as B,dt as L,hr as w,Y as l,pK as F,pL as T,bk as Y,qw as D,eN as G,qx as M,ay as U,qy as V,c_ as q,qz as H,bI as K,i as x,fs as N,a as r,aC as p,E as z}from"../../app.CpNRFW45.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:_}=Y(),{hasSavedCreditCards:S}=D(),c=G(),{value:m}=M(),g=U().searchParams.get(V),C=q().isStandard();return P?.shopPayOptInEnabled===!1||t||!_||a?.__typename==="CustomerProfile"&&s&&(!h||!S)||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 j(){const e=x(),{isOptedIn:t}=N();return!J()||!t?null:r(z,{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{j as S,J as u};