{"version":3,"file":"LanguageSwitchLink.j8r761cd.mjs","names":[],"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":"2MAAiF,SAAwB,EAAiB,CAAC,YAAU,UAAU,WAAS,OAAO,oBAAkB,8BAA8B,mBAAiB,sBAAsB,iBAAe,OAAO,CAAC,CAAC,GAAK,CAAC,EAAO,EAAU,CAAC,EAAS,GAAG,CAAM,CAAC,EAAS,EAAY,CAAC,GAAS,EAAM,CAA6T,MAA5T,GAAU,IAAI,CAAC,IAAM,EAAW,EAAO,SAAS,KAAW,EAAI,IAAI,IAAI,GAAkB,EAAK,EAAI,SAAe,KAAQ,EAAI,SAAS,IAAI,EAAI,OAAO,AAAG,EAAK,WAAW,MAAM,EAAE,EAAU,EAAK,EAAK,QAAQ,QAAQ,GAAG,CAAC,EAAI,OAAO,CAAC,GAAY,EAAK,GAAO,EAAU,EAAK,MAAM,EAAK,EAAI,OAAO,CAAC,GAAY,EAAM,CAAG,EAAC,CAAE,EAAC,CAAqB,EAAK,IAAI,CAAC,KAAK,EAAO,MAAM,CAAC,MAAM,EAAmB,WAAS,WAAW,EAAS,EAAiB,EAAiC,iBAAe,OAAO,SAAU,EAAC,SAAS,EAAS,UAAU,SAAU,EAAC,AAAE,kBAA93B,GAA2C,IAAsC"}