{"version":3,"file":"Traduction.DAsi2NVY.mjs","names":["useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/QAiktIgOg6rGpFPTmqL8/dt6MemWjaMhBvUFf9kzI/Traduction.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";export function FrenchSiteConverter(){const[isTranslating,setIsTranslating]=useState(false);const[currentLang,setCurrentLang]=useState(\"auto\");// Injecter du CSS global pour masquer la barre\nuseEffect(()=>{const style=document.createElement(\"style\");style.innerHTML=`\n          .goog-te-banner-frame { display: none !important; }\n          .goog-te-gadget { display: none !important; }\n          .goog-te-gadget-icon { display: none !important; }\n          .goog-te-spinner { display: none !important; }\n          body { top: 0 !important; }\n          .skiptranslate { display: none !important; }\n        `;document.head.appendChild(style);// Observer le DOM pour supprimer le banner si Google le rajoute\nconst observer=new MutationObserver(()=>{const banner=document.querySelector(\".goog-te-banner-frame\");if(banner&&banner.parentNode){banner.parentNode.removeChild(banner);}const skiptranslate=document.querySelector(\".skiptranslate\");if(skiptranslate){skiptranslate.style.display=\"none\";}document.body.style.top=\"0px\";});observer.observe(document.body,{childList:true,subtree:true});return()=>observer.disconnect();},[]);const loadGoogleTranslateScript=()=>{return new Promise((resolve,reject)=>{if(document.getElementById(\"google-translate-script\")){resolve(true);return;}const script=document.createElement(\"script\");script.id=\"google-translate-script\";script.src=\"https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit\";script.async=true;script.onload=()=>resolve(true);script.onerror=()=>reject(new Error(\"Failed to load Google Translate\"));document.head.appendChild(script);});};const initializeGoogleTranslate=()=>{if(window.google&&window.google.translate){new window.google.translate.TranslateElement({pageLanguage:\"auto\",includedLanguages:\"fr,en,es,de,it,pt,nl,pl,ru,zh,ja,ko,ar\",autoDisplay:false,layout:window.google.translate.TranslateElement.InlineLayout.NONE},\"google_translate_element\");}};const convertToFrench=async()=>{setIsTranslating(true);try{await loadGoogleTranslateScript();window.googleTranslateElementInit=initializeGoogleTranslate;initializeGoogleTranslate();document.cookie=`googtrans=/auto/fr; path=/; domain=${window.location.hostname}; max-age=31536000`;window.location.hash=\"#googtrans(auto|fr)\";setCurrentLang(\"fr\");setTimeout(()=>window.location.reload(),300);}catch(err){console.error(\"Erreur Google Translate:\",err);setIsTranslating(false);}};const revertToOriginal=()=>{document.cookie=`googtrans=; path=/; domain=${window.location.hostname}; expires=Thu, 01 Jan 1970 00:00:00 GMT`;window.location.hash=\"\";setCurrentLang(\"auto\");window.location.reload();};return{onTap:currentLang===\"fr\"?revertToOriginal:convertToFrench,text:isTranslating?\"⏳\":currentLang===\"fr\"?\"🌐 Original\":\"🇫🇷 Fran\\xe7ais\",style:{backgroundColor:currentLang===\"fr\"?\"#10B981\":\"#DB9065\",color:\"black\",borderRadius:3,padding:\"8px 16px\",fontSize:\"14px\",fontWeight:500}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withFrenchSiteConverter(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...FrenchSiteConverter(props)});};}withFrenchSiteConverter.displayName=\"FrenchSiteConverter\";\nexport const __FramerMetadata__ = {\"exports\":{\"FrenchSiteConverter\":{\"type\":\"override\",\"name\":\"FrenchSiteConverter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFrenchSiteConverter\":{\"type\":\"reactHoc\",\"name\":\"withFrenchSiteConverter\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Traduction.map"],"mappings":"ySAAiF,SAAgB,GAAqB,CAAC,GAAK,CAAC,EAAc,GAAkBA,EAAS,GAAM,CAAM,CAAC,EAAY,GAAgBA,EAAS,OAAO,CAC/N,MAAc,CAAC,IAAM,EAAM,SAAS,cAAc,QAAQ,CAAC,EAAM,UAAU;;;;;;;UAOjE,SAAS,KAAK,Y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