{"version":3,"file":"SmartStoreLink.MeJXaxCL.mjs","names":["forwardRef","_jsx","useEffect","__esmMin","window","init_ssg_sandbox_shims","init_npm_react_18_3_1","ce","init_jsx_runtime","J","navigator","isAndroid","ua","isIOS","withSmartStoreLink","Component","props","ref","style","onClick","rest","handleClick","event","ANDROID_URL","IOS_URL","c","withStoreRedirect","init_SmartStoreLink"],"sources":["https:/framerusercontent.com/modules/PxKENAqw0WxiAg1Y7lHB/cAmQRCRA0oNp40XTgVZd/SmartStoreLink.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect}from\"react\";const IOS_URL=\"https://apps.apple.com/app/rippla-influencer-collabs/id6755340730\";const ANDROID_URL=\"https://play.google.com/store/apps/details?id=com.rippla.app\";function isAndroid(ua){return/android/i.test(ua);}function isIOS(ua){return/iphone|ipad|ipod/i.test(ua)||typeof navigator!==\"undefined\"&&navigator.platform===\"MacIntel\"&&navigator.maxTouchPoints>1;}// Click: opens Google Play on Android, App Store everywhere else (iPhone, iPad, desktop fallback)\nexport function withSmartStoreLink(Component){return /*#__PURE__*/forwardRef(function SmartStoreLink(props,ref){const{style,onClick,...rest}=props;const handleClick=event=>{onClick?.(event);if(typeof window===\"undefined\")return;const ua=window.navigator.userAgent||\"\";window.location.href=isAndroid(ua)?ANDROID_URL:IOS_URL;};return /*#__PURE__*/_jsx(Component,{...rest,ref:ref,onClick:handleClick,style:{...style,cursor:\"pointer\"}});});}// On mount: phones go straight to their store (used on /get-app, the QR target). Desktop stays on the page.\nexport function withStoreRedirect(Component){return /*#__PURE__*/forwardRef(function StoreRedirect(props,ref){useEffect(()=>{if(typeof window===\"undefined\")return;const ua=window.navigator.userAgent||\"\";if(isAndroid(ua))window.location.replace(ANDROID_URL);else if(isIOS(ua))window.location.replace(IOS_URL);},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withStoreRedirect\":{\"type\":\"reactHoc\",\"name\":\"withStoreRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSmartStoreLink\":{\"type\":\"reactHoc\",\"name\":\"withSmartStoreLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmartStoreLink.map"],"mappings":"A,yIAAsP,SAASW,EAAUC,EAAG,CAAC,MAAM,WAAW,KAAKA,CAAE,CAAE,CAAC,SAASC,EAAMD,EAAG,CAAC,MAAM,oBAAoB,KAAKA,CAAE,GAAUF,IAAY,QAAaA,EAAU,WAAW,YAAYA,EAAU,eAAe,CAAE,CAC3b,SAAgBI,EAAmBC,EAAU,CAAC,MAAoBf,gBAAW,SAAwBgB,EAAMC,EAAI,CAAC,GAAK,CAACC,QAAMC,UAAQ,GAAGC,GAAMJ,EAAYK,EAAYC,GAAO,CAAkB,GAAjBH,IAAUG,CAAK,EAAYlB,IAAS,OAAY,OAAO,IAAMQ,EAAGR,EAAO,UAAU,WAAW,GAAGA,EAAO,SAAS,KAAKO,EAAUC,CAAE,EAAEW,EAAYC,CAAQ,EAAE,MAAoBvB,gBAAKc,EAAU,CAAC,GAAGK,EAASH,MAAI,QAAQI,EAAY,MAAM,CAAC,GAAGH,EAAM,OAAO,SAAS,CAAC,CAAC,CAAE,CAAC,CAAE,CACpb,SAAgBQ,EAAkBX,EAAU,CAAC,MAAoBf,gBAAW,SAAuBgB,EAAMC,EAAI,CAA6M,OAA5Mf,MAAc,CAAC,GAAUE,IAAS,OAAY,OAAO,IAAMQ,EAAGR,EAAO,UAAU,WAAW,GAAMO,EAAUC,CAAE,EAAER,EAAO,SAAS,QAAQmB,CAAW,EAAUV,EAAMD,CAAE,GAAER,EAAO,SAAS,QAAQoB,CAAO,CAAE,EAAE,CAAC,CAAC,EAAsBvB,gBAAKc,EAAU,CAAC,GAAGC,EAAUC,KAAG,CAAC,CAAE,CAAC,CAAE,C,kDAF3RO,EAAQ,oEAA0ED,EAAY,8D"}