{"version":3,"file":"Localization.CyHvbVfW.mjs","names":["variant"],"sources":["https:/framerusercontent.com/modules/lLm7LRLIfEXsBeyoRpam/BMNX29s40zxVLNoMT3ne/Localization.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{useEffect}from\"react\";const useStore=createStore({currentLanguage:\"en\"});export function withLocalizedMediaCoverage(Component){return props=>{const[store,setStore]=useStore();useEffect(()=>{const preferredLanguage=localStorage.getItem(\"preferredLocale\");const validVariants=[\"en\",\"de\",\"es\",\"fr\",\"pt\"];const variant=validVariants.includes(preferredLanguage)?preferredLanguage:\"en\";setStore({currentLanguage:variant});},[]);const variant=store.currentLanguage;return /*#__PURE__*/_jsx(Component,{...props,variant:variant});};}export function withLocalizedComponent(Component){return props=>{const[store,setStore]=useStore();useEffect(()=>{const preferredLanguage=localStorage.getItem(\"preferredLocale\");const validVariants=[\"en\",\"de\",\"es\",\"fr\",\"pt\"];const variant=validVariants.includes(preferredLanguage)?preferredLanguage:\"en\";setStore({currentLanguage:variant});},[]);const variant=store.currentLanguage;return /*#__PURE__*/_jsx(Component,{...props,variant:variant});};}export function withCurrentLocale(Component){return props=>{const[store,setStore]=useStore();useEffect(()=>{setStore({currentLocale:\"pt\"});},[]);const currentLocale=store.currentLocale;return /*#__PURE__*/_jsx(Component,{...props,currentLocale:\"pt\"});};}// export const withLocale = (Component): ComponentType => {\n//     return forwardRef((props, ref) => {\n//         const locale = (navigator.language || \"en-US\").split(\"-\")[0] // \"en\", \"fr\", etc.\n//         console.log(\"locale\", locale)\n//         return <Component ref={ref} {...props} currentLocale={\"pt\"} />\n//     })\n// }\n\nexport const __FramerMetadata__ = {\"exports\":{\"withCurrentLocale\":{\"type\":\"reactHoc\",\"name\":\"withCurrentLocale\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLocalizedMediaCoverage\":{\"type\":\"reactHoc\",\"name\":\"withLocalizedMediaCoverage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLocalizedComponent\":{\"type\":\"reactHoc\",\"name\":\"withLocalizedComponent\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Localization.map"],"mappings":"8OAAgM,SAAgB,EAA2B,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAU,GAAU,CAAC,MAAc,CAAC,IAAM,EAAkB,aAAa,QAAQ,kBAAkB,CAAsDA,EAAjC,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,CAA6B,SAAS,EAAkB,CAAC,EAAkB,KAAK,EAAS,CAAC,gBAAgBA,EAAQ,CAAC,EAAG,EAAE,CAAC,CAAC,IAAM,EAAQ,EAAM,gBAAgB,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAc,UAAQ,CAAC,EAAI,SAAgB,EAAuB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAU,GAAU,CAAC,MAAc,CAAC,IAAM,EAAkB,aAAa,QAAQ,kBAAkB,CAAsDA,EAAjC,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,CAA6B,SAAS,EAAkB,CAAC,EAAkB,KAAK,EAAS,CAAC,gBAAgBA,EAAQ,CAAC,EAAG,EAAE,CAAC,CAAC,IAAM,EAAQ,EAAM,gBAAgB,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAc,UAAQ,CAAC,qBAAnhC,IAAqE,IAA6B,CAAM,EAAS,EAAY,CAAC,gBAAgB,KAAK,CAAC"}