// Grilla Semanal — Schedule section function Schedule({ theme, t }) { const todayIdx = (() => { const d = new Date().getDay(); // 0 = Dom return d === 0 ? 6 : d - 1; // Lun=0 … Dom=6 })(); const [openIdx, setOpenIdx] = React.useState(todayIdx); const toggle = (i) => setOpenIdx(openIdx === i ? null : i); const styleColor = (style) => { const s = style.toLowerCase(); if (s.includes('bachatalambazouk')) return 'oklch(52% 0.20 268)'; // blue-purple if (s.includes('bachata fem')) return 'oklch(58% 0.20 340)'; // pink if (s.includes('bachata')) return 'oklch(50% 0.21 355)'; // deep pink-red if (s.includes('salsa la') || s.includes('salsa l.a')) return 'oklch(62% 0.21 48)'; // orange if (s.includes('salsa cubana')) return 'oklch(54% 0.23 32)'; // orange-red if (s.includes('rueda')) return 'oklch(64% 0.19 72)'; // amber if (s.includes('salsa')) return 'oklch(50% 0.27 18)'; // true red if (s.includes('tango')) return 'oklch(36% 0.08 36)'; // dark brown if (s.includes('cha-cha') || s.includes('chacha')) return 'oklch(62% 0.16 80)'; // yellow-green return theme.accent; }; const days = t.schedule.days; return (
{/* ── Header ──────────────────────────────────────────── */}
{t.schedule.kicker} {t.schedule.title}

{t.schedule.lead}

{t.schedule.note}

{/* ── Accordion ────────────────────────────────────────── */}
{days.map((day, i) => { const isOpen = openIdx === i; const isToday = todayIdx === i; const hasSocial = !!day.social; return (
{/* — Row header — */} {/* — Expanded panel — */} {isOpen && (
{/* Class cards grid */}
{day.classes.map((cls, j) => (
{/* Time */} {cls.time} {/* Color dot */} {/* Style + level */}
{cls.style}
{cls.level}
{/* Teacher name */}
{cls.teacher || '.....'}
))}
{/* Social event strip(s) */} {(() => { const socials = day.social ? (Array.isArray(day.social) ? day.social : [day.social]) : []; return socials.map((s, k) => (
{s.time}
{s.name}
{s.desc}
)); })()}
)}
); })}
{/* ── WhatsApp CTA ──────────────────────────────────────── */}

{t.schedule.note}

{t.schedule.cta}
); } window.Schedule = Schedule;