/* All screens: Home, Search, Map, Calendar, Detail, Booking, Tickets, Profile, Notifications, Organiser, CreateEvent, AI */ const { useState, useEffect, useRef, useMemo } = React; // ─── HOME / DISCOVER ────────────────────────────────────────────── const HomeScreen = ({ tweaks, isMobile, nav }) => { const heroVariant = tweaks.heroVariant || "stack"; const cardVariant = tweaks.cardStyle || "rich"; const dense = tweaks.density || "comfortable"; const currency = tweaks.currency || "INR"; const friends = tweaks.showFriends !== false; const [activeMood, setActiveMood] = useState(null); const [heroIdx, setHeroIdx] = useState(0); const heroEvents = DATA.events.slice(0, 3); useEffect(() => { const t = setInterval(() => setHeroIdx(i => (i+1) % heroEvents.length), 6000); return () => clearInterval(t); }, []); // Hero variants const Hero = () => { if (heroVariant === "marquee") { // Editorial marquee hero — large text + scrolling tape const ev = heroEvents[heroIdx]; return (
● Live now in {DATA.city} · {DATA.events.length} events this week

What's good tonight?

); } if (heroVariant === "split") { const ev = heroEvents[heroIdx]; return (
● Featured tonight

{ev.title}

{ev.date} · {ev.time} {ev.venue}, {ev.area}
{heroEvents.map((_, i) => (
); } // Stack (default) — full bleed image with content over const ev = heroEvents[heroIdx]; return (
● Tonight in {DATA.city}

{ev.title}

{ev.date} · {ev.time} {ev.venue} From {fmtPrice(ev.price, currency)}
{heroEvents.map((_, i) => (
); }; const filtered = activeMood ? DATA.events.filter(e => e.mood?.includes(activeMood)) : DATA.events; const cardCols = isMobile ? "repeat(2, 1fr)" : "repeat(4, 1fr)"; return (
{/* MOOD ROW */}
{DATA.moods.map(m => { const active = activeMood === m.id; return ( ); })}
{/* AI ASSISTANT BAND */}
AI Concierge
"What's good Saturday?"
Get plans tailored to you, your friends, your budget.
{/* HAPPENING TONIGHT */}
m.id===activeMood)?.label} picks` : "Happening tonight"} action="See all" onAction={()=>nav("search")} dense={dense}>
{filtered.slice(0, isMobile?4:8).map(ev => ( nav("detail", ev.id)} /> ))}
{/* FRIENDS GOING (social) */}
{DATA.friends.slice(0,5).map((f,i) => (
{f.initial}
))}
5 friends are going to 3 events this week
Ananya, Rohan, Sneha + 2 others
{DATA.events.filter(e => e.friends >= 3).slice(0, isMobile?2:4).map(ev => ( nav("detail", ev.id)} /> ))}
{/* NEAR YOU */}
nav("map")} dense={dense}>
{DATA.events.filter(e=>["South Mumbai","Central"].includes(e.neighborhood)).slice(0, isMobile?4:8).map(ev => ( nav("detail", ev.id)} /> ))}
{/* CATEGORIES */}
{DATA.categories.map(c => { const Icon = I[c.icon]; return ( ); })}
{/* THIS WEEKEND */}
{DATA.events.filter(e=>e.date.includes("14 Jun") || e.date.includes("15 Jun")).slice(0, isMobile?4:4).map(ev => ( nav("detail", ev.id)} /> ))}
); }; window.HomeScreen = HomeScreen;