{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/JdLsogIj8d1RWkzyXdHB/KMEdku45J8BZyQNc4kDC/WithTranslation.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";const useStore=createStore({lang:\"\"});const LANG_EN=\"en\";const LANG_ZH_HK=\"zh_hk\";const LANG_ZH_CN=\"zh_cn\";export function withTranslation(Component){return props=>{const[store,setStore]=useStore();const[savedLang,setSavedLang]=useState(\"\");useEffect(()=>{const savedLang=localStorage.getItem(\"lang\");if(savedLang){setStore({...store,lang:savedLang});setSavedLang(savedLang);}},[]);return /*#__PURE__*/_jsx(Component,{...props,variant:store.lang||savedLang});};}export function withGetLangFromBrowser(Component){return props=>{const[store,setStore]=useStore();const[savedLang,setSavedLang]=useState(\"\");useEffect(()=>{const savedLang=localStorage.getItem(\"lang\");if(savedLang){setStore({...store,lang:savedLang});setSavedLang(savedLang);}},[]);return /*#__PURE__*/_jsx(Component,{...props,variant:store.lang});};}export function withSelectEn(Component){return props=>{const[store,setStore]=useStore();const handleSelectLang=e=>{e.preventDefault();setStore({...store,lang:LANG_EN});const savedLang=localStorage.getItem(\"lang\");if(!savedLang||savedLang!==LANG_EN){localStorage.setItem(\"lang\",LANG_EN);}};return /*#__PURE__*/_jsx(Component,{...props,tap:handleSelectLang});};}export function withSelectZhHk(Component){return props=>{const[store,setStore]=useStore();const handleSelectLang=e=>{e.preventDefault();setStore({...store,lang:LANG_ZH_HK});const savedLang=localStorage.getItem(\"lang\");if(!savedLang||savedLang!==LANG_ZH_HK){localStorage.setItem(\"lang\",LANG_ZH_HK);}};return /*#__PURE__*/_jsx(Component,{...props,tap:handleSelectLang});};}export function withSelectZhCn(Component){return props=>{const[store,setStore]=useStore();const handleSelectLang=e=>{e.preventDefault();setStore({...store,lang:LANG_ZH_CN});const savedLang=localStorage.getItem(\"lang\");if(!savedLang||savedLang!==LANG_ZH_CN){localStorage.setItem(\"lang\",LANG_ZH_CN);}};return /*#__PURE__*/_jsx(Component,{...props,tap:handleSelectLang});};}export default function SearchInputWithTranslation(props){return /*#__PURE__*/_jsx(\"input\",{type:\"text\",value:props.searchInput,onChange:props.onChange,placeholder:\"\",style:{border:\"2px solid #0497A7\",borderRadius:\"8px\",backgroundColor:\"#FFFFFF\",boxSizing:\"border-box\",padding:\"14px 16px\",fontSize:\"16px\",lineHeight:\"32px\",fontFamily:\"Outfit\",fontWeight:\"500\",color:\"#333333\",width:\"100%\",height:\"48px\",outline:\"none\"}});}\nexport const __FramerMetadata__ = {\"exports\":{\"withSelectZhHk\":{\"type\":\"reactHoc\",\"name\":\"withSelectZhHk\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTranslation\":{\"type\":\"reactHoc\",\"name\":\"withTranslation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSelectEn\":{\"type\":\"reactHoc\",\"name\":\"withSelectEn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSelectZhCn\":{\"type\":\"reactHoc\",\"name\":\"withSelectZhCn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"SearchInputWithTranslation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGetLangFromBrowser\":{\"type\":\"reactHoc\",\"name\":\"withGetLangFromBrowser\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithTranslation.map"],
  "mappings": "gGAAsJ,IAAMA,EAASC,EAAY,CAAC,KAAK,EAAE,CAAC,EAA8E,SAASC,EAAgBC,EAAU,CAAC,OAAOC,GAAO,CAAC,GAAK,CAACC,EAAMC,CAAQ,EAAEC,EAAS,EAAO,CAACC,EAAUC,CAAY,EAAEC,EAAS,EAAE,EAAE,OAAAC,EAAU,IAAI,CAAC,IAAMH,EAAU,aAAa,QAAQ,MAAM,EAAKA,IAAWF,EAAS,CAAC,GAAGD,EAAM,KAAKG,CAAS,CAAC,EAAEC,EAAaD,CAAS,EAAG,EAAE,CAAC,CAAC,EAAsBI,EAAKT,EAAU,CAAC,GAAGC,EAAM,QAAQC,EAAM,MAAMG,CAAS,CAAC,CAAE,CAAE,CAA67C,SAARK,EAA4CC,EAAM,CAAC,OAAoBC,EAAK,QAAQ,CAAC,KAAK,OAAO,MAAMD,EAAM,YAAY,SAASA,EAAM,SAAS,YAAY,GAAG,MAAM,CAAC,OAAO,oBAAoB,aAAa,MAAM,gBAAgB,UAAU,UAAU,aAAa,QAAQ,YAAY,SAAS,OAAO,WAAW,OAAO,WAAW,SAAS,WAAW,MAAM,MAAM,UAAU,MAAM,OAAO,OAAO,OAAO,QAAQ,MAAM,CAAC,CAAC,CAAE",
  "names": ["useStore", "createStore", "withTranslation", "Component", "props", "store", "setStore", "useStore", "savedLang", "setSavedLang", "ye", "ue", "p", "SearchInputWithTranslation", "props", "p"]
}
