{"version":3,"file":"LanguageSwitchLink.KdleFSR5.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/UJO95KjZeYjWPeR5Q8E3/DxNaEwPkvgYIbsU5mEjr/LanguageSwitchLink.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export default function LanguageSwitcher({textColor=\"#19174F\",fontSize=\"16px\",fontFamilyEnglish=\"GE SS Two Light, sans-serif\",fontFamilyArabic=\"Figtree, sans-serif\",textDecoration=\"none\"}){const[newUrl,setNewUrl]=useState(\"\");const[isArabic,setIsArabic]=useState(false);useEffect(()=>{const currentUrl=window.location.href;const url=new URL(currentUrl);const path=url.pathname;const host=`${url.protocol}//${url.host}`;if(path.startsWith(\"/ar\")){setNewUrl(host+path.replace(/^\\/ar/,\"\")+url.search);setIsArabic(true);}else{setNewUrl(host+\"/ar\"+path+url.search);setIsArabic(false);}},[]);return /*#__PURE__*/_jsx(\"a\",{href:newUrl,style:{color:textColor,fontSize:fontSize,fontFamily:isArabic?fontFamilyArabic:fontFamilyEnglish,textDecoration:textDecoration,cursor:\"pointer\"},children:isArabic?\"English\":\"العربية\"});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LanguageSwitcher\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LanguageSwitchLink.map"],"mappings":"kIAAiF,SAAwB,EAAiB,CAAC,YAAU,UAAU,WAAS,OAAO,oBAAkB,8BAA8B,mBAAiB,sBAAsB,iBAAe,QAAQ,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAS,GAAG,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAA6T,OAA5T,MAAc,CAAC,IAAM,EAAW,EAAO,SAAS,KAAW,EAAI,IAAI,IAAI,EAAW,CAAO,EAAK,EAAI,SAAe,EAAK,GAAG,EAAI,SAAS,IAAI,EAAI,OAAU,EAAK,WAAW,MAAM,EAAE,EAAU,EAAK,EAAK,QAAQ,QAAQ,GAAG,CAAC,EAAI,OAAO,CAAC,EAAY,GAAK,GAAO,EAAU,EAAK,MAAM,EAAK,EAAI,OAAO,CAAC,EAAY,GAAM,GAAI,EAAE,CAAC,CAAqB,EAAK,IAAI,CAAC,KAAK,EAAO,MAAM,CAAC,MAAM,EAAmB,WAAS,WAAW,EAAS,EAAiB,EAAiC,iBAAe,OAAO,UAAU,CAAC,SAAS,EAAS,UAAU,UAAU,CAAC,sBAAj1B,IAAsC"}