{"version":3,"file":"DynamicLinks.CSpadQbp.mjs","names":[],"sources":["https:/framerusercontent.com/modules/9MNVhdxqNO8g2VbmW8z7/tu9cplMgn6100DYiGiwb/DynamicLinks.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useLocaleInfo}from\"framer\";export function withLocalizedLink(Component){return props=>{const{activeLocale}=useLocaleInfo();// This will print the actual code to your browser console (F12)\n// so you can see exactly what Framer is sending.\nconsole.log(\"Current Framer Locale Code:\",activeLocale?.code);const getLangParam=()=>{const code=activeLocale?.code?.toLowerCase()||\"\";// Check if the code starts with 'de' (covers de, de-CH, de-DE)\nif(code.startsWith(\"de\"))return\"de\";// Check if the code starts with 'fr' (covers fr, fr-CH, fr-FR)\nif(code.startsWith(\"fr\"))return\"fr\";// Default to English\nreturn\"en\";};const currentLang=getLangParam();const localizedUrl=`https://app.jurilo.ch/signin?lang=${currentLang}`;return /*#__PURE__*/_jsx(Component,{...props,href:localizedUrl,target:\"_blank\",rel:\"noopener\"});};}export function dynamicRedirect(Component){return props=>{const{activeLocale}=useLocaleInfo();const getLangParam=()=>{const code=activeLocale?.code?.toLowerCase()||\"\";// Check if the code starts with 'de' (covers de, de-CH, de-DE)\nif(code.startsWith(\"de\"))return\"de\";// Check if the code starts with 'fr' (covers fr, fr-CH, fr-FR)\nif(code.startsWith(\"fr\"))return\"fr\";// Default to English\nreturn\"en\";};const currentLang=getLangParam();const handleRedirect=e=>{const localizedUrl=`https://app.jurilo.ch/signup?lang=${currentLang}`;window.location.href=localizedUrl;};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleRedirect,style:{cursor:\"pointer\",width:\"100%\"}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"dynamicRedirect\":{\"type\":\"reactHoc\",\"name\":\"dynamicRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLocalizedLink\":{\"type\":\"reactHoc\",\"name\":\"withLocalizedLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicLinks.map"],"mappings":"oKAA6E,SAAgB,EAAkB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,gBAAc,EAAc,EAE3K,QAAQ,IAAI,8BAA8B,GAAc,IAAI,EAGd,IAAM,EAAa,0CAHoB,CAAC,IAAM,EAAK,GAAc,MAAM,YAAY,GAAG,GAGpI,OAFG,EAAK,WAAW,IAAI,EAAQ,KAC5B,EAAK,WAAW,IAAI,EAAQ,KACzB,IAAK,EAAoB,CAAiF,IAAI,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,EAAa,OAAO,SAAS,IAAI,UAAU,CAAC,CAAE,CAAE,CAAC,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,gBAAc,EAAc,EAGhS,OAHyT,CAAC,IAAM,EAAK,GAAc,MAAM,YAAY,GAAG,GAG3X,OAFG,EAAK,WAAW,IAAI,EAAQ,KAC5B,EAAK,WAAW,IAAI,EAAQ,KACzB,IAAK,EAAoB,CAAa,EAAQ,EAAe,GAAG,CAAC,IAAM,EAAa,qCAAqC,IAAc,EAAO,SAAS,KAAK,CAAa,EAAE,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,QAAQ,EAAe,MAAM,CAAC,OAAO,UAAU,MAAM,MAAM,CAAC,CAAC,CAAE,CAAE,qBARrP,IAAkC"}