import{u as p}from"./dist-vendor.a3kfnPsb.js";import{L as c,M as e,N as t,Q as g,U as h,V as v,X as f,T as P}from"./shop-pay-ButtonWithRegisterWebPixel.DNiJgoKP.js";import{g as R,h as O,F as G,a as _,j as y}from"./shop-pay-FullScreenBackground.wUQlmEwa.js";import{u as M}from"./graphql-useShowShopPayOptin.DNkUZ1XT.js";function I(){const{geolocation:r}=R(),a=c({key:"remember_me_non_gdpr_variant",variants:[e.Control,e.Treatment1,e.Treatment2]}),s=c({key:"remember_me_gdpr_variant",variants:[t.Control,t.Treatment1,t.Treatment2]}),n=O(G),{client:T}=_(),u=T.unstable_getSerialization("experiments"),l=u?.find(m=>m.clientHandle===g)?.variant,d=u?.find(m=>m.clientHandle===h)?.variant,i=s??d,o=a??l,E=!v(r.country.code);return!s&&!a&&E&&l&&!n?{segment:null,variant:null,isTreatment:!1}:i&&!n?i===t.Treatment1?{segment:"GDPR",variant:t.Treatment1,isTreatment:!0}:i===t.Treatment2?{segment:"GDPR",variant:t.Treatment2,isTreatment:!0}:{segment:"GDPR",variant:t.Control,isTreatment:!1}:o||n?n?{segment:"Non-GDPR",variant:e.Treatment1,isTreatment:!0}:o===e.Treatment1?{segment:"Non-GDPR",variant:e.Treatment1,isTreatment:!0}:o===e.Treatment2?{segment:"Non-GDPR",variant:e.Treatment2,isTreatment:!0}:{segment:"Non-GDPR",variant:e.Control,isTreatment:!1}:{segment:null,variant:null,isTreatment:!1}}function N(){return!!y().shopPayArtifact.value?.optIn}function V(){const{i18n:r}=_(),a=M(),s=N(),n=I();return!a||!s||n.isTreatment?null:p(P,{color:"subdued",children:r.translate("sign_up_footer.button_footer",{privacy_href:p(f,{target:"_blank",href:"https://www.shopify.com/legal/privacy/app-users",children:r.translate("sign_up_footer.privacy_policy")}),terms_href:p(f,{target:"_blank",href:"https://shop.app/terms-of-service",children:r.translate("sign_up_footer.terms_of_service")})})})}export{V as S,I as u};
