/* Floating WhatsApp + Booksy buttons + Popup promo */ function FloatingButtons() { const t = useT(); return (
{t('float_wa')} {t('float_book')}
); } // ───────── POPUP ───────── function Popup() { const t = useT(); const [show, setShow] = React.useState(false); const [dismissed, setDismissed] = React.useState(false); // El popup se basa en el curso "featured" definido en data.jsx const featured = GH_DATA.courses.find((c) => c.featured) || GH_DATA.courses[0]; const { lang } = useLang(); React.useEffect(() => { try { if (sessionStorage.getItem('gh-popup-dismissed') === '1') { setDismissed(true); return; } } catch {} const timer = setTimeout(() => setShow(true), 5500); return () => clearTimeout(timer); }, []); const close = () => { setShow(false); try { sessionStorage.setItem('gh-popup-dismissed', '1'); } catch {} }; if (dismissed) return null; return (
{featured.img ? ( {featured[lang]} ) : (
Curso destacado
)}
{t('pop_eyebrow')}

{featured[lang]}

{featured.price ? `${featured.price}€` : (t('pop_cta'))} {featured.mode === 'online' ? t('mode_on') : t('mode_in')} {' · '} {featured[`duration_${lang}`] || `${featured.hours || ''} ${t('hours')}`}

{t('pop_sub')}

{t('pop_cta')}
); } window.FloatingButtons = FloatingButtons; window.Popup = Popup;