/* Cookie Banner — Rubin */ /* global React, ReactDOM, window */ const CookieBanner = () => { const [visible, setVisible] = React.useState(false); const lang = window.TWEAK_DEFAULTS?.lang || localStorage.rubin_lang || 'en'; React.useEffect(() => { if (!localStorage.getItem('rubin_cookie_v1')) { setVisible(true); } }, []); const save = (val) => { localStorage.setItem('rubin_cookie_v1', val); setVisible(false); }; if (!visible) return null; const content = { en: { msg: "We use a single localStorage entry to remember this choice. No analytics, no tracking. ", link: "Learn more", ok: "Accept", no: "Reject" }, pl: { msg: "Zapisujemy Twoją decyzję w jednym wpisie localStorage. Bez analityki, bez śledzenia. ", link: "Dowiedz się więcej", ok: "Zaakceptuj", no: "Odrzuć" } }[lang] || { msg: "", link: "", ok: "", no: "" }; return (