// Main App const { useState: useStateA, useEffect: useEffectA } = React; const S = window.Sections; function App() { const [lang, setLang] = useStateA('pt-BR'); const [currency, setCurrency] = useStateA(() => window.getCurrency('pt-BR')); useEffectA(() => { // Initial detection: keep PT-BR default but recompute currency for that lang setCurrency(window.getCurrency('pt-BR')); }, []); const handleSetLang = (newLang) => { setLang(newLang); setCurrency(window.getCurrency(newLang)); document.documentElement.lang = newLang; }; const t = window.translations[lang]; return (