import{m as e}from"./2c1ab0fe.Dbn2KvkT.js";import{d as a,N as t,P as r,Q as n,R as o,T as u}from"./4b4bc88f.z1yoAwwH.js";import{C as s,_ as l,l as i,$ as d,a0 as p}from"./164ad2e3.FTBuhkTQ.js";function c(){const e=s();if(e.value)return{...e.value.shopAppLinksAndResources}}function f(){const{checkout:s,embed:f,mobileCheckoutSdk:v,router:m,shop:y,shopPay:h}=a(),P=e(()=>Boolean(s.negotiator.current.fields.buyerIdentity.value?.purchasingCompany)),g=e(()=>"CustomerProfile"===s.negotiator.current.fields.buyerIdentity.value?.customerProfile?.__typename),b=l().value,S=s.configuration.layout.isOnePage.value,I=c(),L=s.negotiator.parts.paymentLines.value,k=e(()=>{const e=s.negotiator.current.fields.paymentLines.value;return null!=e&&!t(e.lines,"SHOPIFY_INSTALLMENTS")}),{currentDetour:A}=i().value,O=d(),_=!y.hasFlagEnabled(r),N=p(),T=e(()=>Boolean(n(s.negotiator.current.fields.paymentMethods.value).length)),Y=s.proposal.negotiated.fields.mustSelectProvidedAddress.value,C=m.currentUrl.value,E=o(C.searchParams),M=e(()=>s.negotiator.current.fields.paymentMethods.value?.some(e=>"wallet"===e.type&&"SHOP_PAY"===e.name)),j=null!=t(L,"SHOPIFY_INSTALLMENTS");if(s.negotiator.parts.phone.value)return!1;if(!1===O?.shopPayOptInEnabled)return!1;if(P.value)return!1;if(!N.value)return!1;if(g.value&&b){if(!S)return!1;if(!T.value)return!1}return!h.userIdentified.value&&"shopPay"!==s.identity.current.value&&!u(s.identity.current.value)&&!E&&!Y&&!Boolean(f)&&!v.enabled&&(!_||!I?.shopPayOrder)&&!(!M.value&&"thankYou"!==A?.type)&&("thankYou"===A?.type?k.value:!j)}export{c as a,f as u};