import{Pt as e,ft as r}from"./630ba094.L_X-5TXi.js";import{Js as t,Qv as a,YE as n,b_ as u,cs as s,hE as l,lE as o,ls as i,lx as f,xO as p}from"./6ec9a0fa.rdcQt2v8.js";function c(){const e=a();if(e.value)return{...e.value.shopAppLinksAndResources}}function d(){const{checkout:{negotiator:a,journey:d,proposal:v,identity:y},embed:h,mobileCheckoutSdk:m,router:P,shop:b,shopPay:S}=p(),I=e(()=>Boolean(a.current.fields.buyerIdentity.value?.purchasingCompany)),E=e(()=>"CustomerProfile"===a.current.fields.buyerIdentity.value?.customerProfile?.__typename),L=t(),k=r(c()?.shopPayOrder),A=e(()=>{const e=a.current.fields.paymentLines.value;return null!=e&&!o(e.lines,"SHOPIFY_INSTALLMENTS")}),O=i(),Y=!b.hasFlagEnabled(n),_=u(),g=e(()=>Boolean(f(a.current.fields.paymentMethods.value).length)),M=e(()=>a.current.fields.paymentMethods.value?.some(e=>"wallet"===e.type&&"SHOP_PAY"===e.name));return e(()=>{if(a.parts.phone.value)return!1;if(!1===O?.shopPayOptInEnabled)return!1;if(I.value)return!1;if(!_.value)return!1;if(E.value&&L.value&&!g.value)return!1;if(S.userIdentified.value)return!1;if("shopPay"===y.current.value)return!1;if(l(y.current.value))return!1;if(s(P.currentUrl.value.searchParams))return!1;if(v.negotiated.fields.mustSelectProvidedAddress.value)return!1;if(Boolean(h)||m.enabled)return!1;if(Y&&k.value)return!1;const e=d.currentDetour.value;return!(!M.value&&"thankYou"!==e?.type)&&("thankYou"===e?.type?A.value:null==o(a.parts.paymentLines.value,"SHOPIFY_INSTALLMENTS"))})}export{c as n,d as t};