{"version":3,"file":"Dashboard_url_localisation.qfZe75-R.mjs","names":["useState","__legacyOverrideHOC_DataObserverContext","_jsx","__esmMin","init_ssg_sandbox_shims","init_npm_react_18_3_1","oe","navigator","window","init_jsx_runtime","ce","_e","init_framer_Bf4_tcb2","DataObserverContext","useLocaleLinks","lang","setLang","detectedLang","getLanguage","localeLinks","withuseLocaleLinks","c","C","props","init_Dashboard_url_localisation","pathLang"],"sources":["https:/framerusercontent.com/modules/3PMm8PFUMmTXYYJTTIuE/ZailTwyPQCPUNzUr3nRy/Dashboard_url_localisation.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";const getLanguage=()=>{if(typeof window===\"undefined\")return\"gb\"// Prevent issues in Framer preview\n;// Extract first part of the pathname (e.g., \"/nl/\", \"/be-fr/\")\nconst pathLang=window.location.pathname.split(\"/\")[1]?.toLowerCase()||\"\";// Special handling for \"be-fr\"\nif(pathLang===\"be-fr\")return\"be-fr\";// Standard two-letter language codes\nif(pathLang.length===2)return pathLang;// Check ?lang= parameter\nconst urlParams=new URLSearchParams(window.location.search);const queryLang=urlParams.get(\"lang\")?.toLowerCase();if(queryLang)return queryLang;// Fallback to browser language\nreturn(navigator.language||\"en\").toLowerCase().split(\"-\")[0];};// Locale mappings\nconst localeLinks={gb:\"https://my.mollie.com/dashboard/signup?lang=en\",nl:\"https://my.mollie.com/dashboard/signup?lang=nl\",de:\"https://my.mollie.com/dashboard/signup?lang=de\",at:\"https://my.mollie.com/dashboard/signup?lang=at\",be:\"https://my.mollie.com/dashboard/signup?lang=be\",fr:\"https://my.mollie.com/dashboard/signup?lang=fr\",\"be-fr\":\"https://my.mollie.com/dashboard/signup?lang=be-fr\",se:\"https://my.mollie.com/dashboard/signup?lang=sv-se\",it:\"https://my.mollie.com/dashboard/signup?lang=it-it\",pl:\"https://my.mollie.com/dashboard/signup?lang=pl-pl\",pt:\"https://my.mollie.com/dashboard/signup?lang=pt-pt\",cz:\"https://my.mollie.com/dashboard/signup?lang=cs\",dk:\"https://my.mollie.com/dashboard/signup?lang=da\",fi:\"https://my.mollie.com/dashboard/signup?lang=fi-fi\",si:\"https://my.mollie.com/dashboard/signup?lang=sl-se\",es:\"https://my.mollie.com/dashboard/signup?lang=es\",hu:\"https://my.mollie.com/dashboard/signup?lang=hu\",no:\"https://my.mollie.com/dashboard/signup?lang=nb\"};// **Framer Code Override**\nexport function useLocaleLinks(){const[lang,setLang]=useState(\"gb\");useEffect(()=>{const detectedLang=getLanguage();setLang(localeLinks[detectedLang]?detectedLang:\"gb\")// Ensure fallback\n;},[]);return{link:localeLinks[lang],href:localeLinks[lang]};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withuseLocaleLinks(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...useLocaleLinks(props)});};}withuseLocaleLinks.displayName=\"useLocaleLinks\";\nexport const __FramerMetadata__ = {\"exports\":{\"withuseLocaleLinks\":{\"type\":\"reactHoc\",\"name\":\"withuseLocaleLinks\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useLocaleLinks\":{\"type\":\"override\",\"name\":\"useLocaleLinks\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Dashboard_url_localisation.map"],"mappings":"A,uMAQA,SAAgBc,GAAgB,CAAC,GAAK,CAACC,EAAKC,GAAShB,EAAS,IAAI,EAC3D,OAD6DU,MAAc,CAAC,IAAMO,EAAaC,EAAY,EAAEF,EAAQG,EAAYF,GAAcA,EAAa,IAAI,CACtK,EAAE,CAAC,CAAC,EAAQ,CAAC,KAAKE,EAAYJ,GAAM,KAAKI,EAAYJ,EAAK,CAAE,CAAoJ,SAAgBK,EAAmB,EAAE,CAAC,MAAO,KAAQd,EAA+BL,CAAuC,EAASC,EAAKoB,EAAE,CAAC,GAAGC,EAAM,GAAGT,EAAeS,CAAK,CAAC,CAAC,EAAI,C,sDAT5S,MAAgB,CAAC,GAAUf,IAAS,OAAY,MAAM,KAE7I,IAAMiB,EAASjB,EAAO,SAAS,SAAS,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,YAAY,GAAG,GAItE,OAHGiB,IAAW,QAAc,QACzBA,EAAS,SAAS,EAASA,EAC8C,IAAxD,gBAAgBjB,EAAO,SAAS,MAAgC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,YAAY,IACxGD,EAAU,UAAU,KAAA,CAAM,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,EAAG,EACvD,EAAY,CAAC,GAAG,iDAAiD,GAAG,iDAAiD,GAAG,iDAAiD,GAAG,iDAAiD,GAAG,iDAAiD,GAAG,iDAAiD,QAAQ,oDAAoD,GAAG,oDAAoD,GAAG,oDAAoD,GAAG,oDAAoD,GAAG,oDAAoD,GAAG,iDAAiD,GAAG,iDAAiD,GAAG,oDAAoD,GAAG,oDAAoD,GAAG,iDAAiD,GAAG,iDAAiD,GAAG,gDAAgD,EAEhlB,EAAmB,YAAY,gB"}