/* Tickets wallet, Profile, Notifications, AI Assistant, Organiser, Create event */ const { useState, useEffect, useRef } = React; // ─── TICKETS WALLET ─────────────────────────────────────────────── const TicketsScreen = ({ tweaks, isMobile, nav }) => { const currency = tweaks.currency || "INR"; const [activeTab, setActiveTab] = useState("upcoming"); const upcoming = DATA.events.slice(0,3).map(e => ({...e, qty: e.id==="e1"?2:1, code: e.id.toUpperCase()+"-"+(1000+e.id.charCodeAt(0)) })); const past = DATA.events.slice(8,11); const QR = ({ size=160, seed=1 }) => ( {/* corner squares */} {[[0,0],[14,0],[0,14]].map(([x,y]) => ( ))} {/* random fill */} {Array.from({length: 220}).map((_, i) => { const x = (i * 7 + seed*3) % 21; const y = ((i*11 + seed*5) % 21); if ((x<7&&y<7)||(x>13&&y<7)||(x<7&&y>13)) return null; return ; })} ); return (
Wallet

Your tickets

{[{id:"upcoming",l:`Upcoming (${upcoming.length})`},{id:"past",l:`Past (${past.length})`}].map(t => ( ))}
{activeTab === "upcoming" ? (
{upcoming.map((t, idx) => (
{/* Image strip */}
{idx === 0 && (
● Tonight
)}
{/* Stub line */}
{/* Content */}
{t.tag}

{t.title}

When
{t.date} · {t.time}
Where
{t.venue}
Qty
{t.qty} ticket{t.qty>1?"s":""}
Code
{t.code}
))} {/* Featured ticket — large QR */}
● Tonight · Use this to enter

{upcoming[0].title}

Booking ref
{upcoming[0].code}
Gate opens
{upcoming[0].time === "8 PM" ? "7 PM" : "6 PM"}
Seat
GA · 2 × Standard
) : (
{past.map(p => (
{p.title}
{p.date} · attended
))}
)}
); }; // ─── PROFILE ───────────────────────────────────────────────────── const ProfileScreen = ({ tweaks, isMobile, nav }) => { const stats = [ { v:"24", l:"Events" }, { v:"₹18.4k", l:"Spent" }, { v:"7", l:"Cities" }, { v:"12", l:"Following" }, ]; return (
{/* Header */}
A

Aarav K.

Mumbai · Joined Jun 2024
● Music head Foodie
{/* Stats */}
{stats.map(s => (
{s.v}
{s.l}
))}
{/* Interests */}

Interests

{["Indie music","Standup comedy","Jazz","Photography","Football","Tech talks","Whiskey tastings","Art galleries"].map((t,i) => ( ))}
{/* Saved */}

Saved (8)

{DATA.events.slice(4,8).map(e => (
nav("detail", e.id)} style={{ cursor:"pointer", aspectRatio:"3/4", borderRadius:"var(--radius)", overflow:"hidden", position:"relative" }}>
{e.title}
{e.date}
))}
{/* Settings */}

Settings

{[ { l:"Notifications", s:"Reminders, new events", icon:"bell" }, { l:"Payment methods", s:"3 saved", icon:"ticket" }, { l:"Privacy", s:"Friends, location", icon:"users" }, { l:"Help & feedback", s:"FAQ, contact", icon:"sparkle" }, ].map((s,i) => { const Icon = I[s.icon]; return ( ); })}
); }; // ─── AI ASSISTANT (modal-style screen) ────────────────────────── const AIScreen = ({ tweaks, isMobile, nav }) => { const currency = tweaks.currency || "INR"; const [messages, setMessages] = useState([ { role:"ai", text:"Hi Aarav 👋 What's the vibe? Give me a night, a budget, or just say 'surprise me'." }, ]); const [input, setInput] = useState(""); const [loading, setLoading] = useState(false); const [recs, setRecs] = useState([]); const endRef = useRef(null); useEffect(() => { endRef.current?.scrollTo(0, 9999); }, [messages, loading]); const send = async (text) => { if (!text.trim()) return; setMessages(m => [...m, { role:"user", text }]); setInput(""); setLoading(true); // Pick fake recs based on keywords const lower = text.toLowerCase(); let picked = DATA.events.slice(0,3); if (lower.includes("comedy") || lower.includes("funny")) picked = DATA.events.filter(e=>e.category==="Comedy").slice(0,3); else if (lower.includes("music") || lower.includes("gig") || lower.includes("concert")) picked = DATA.events.filter(e=>e.category==="Music").slice(0,3); else if (lower.includes("free")) picked = DATA.events.filter(e=>e.price===0).slice(0,3); else if (lower.includes("saturday") || lower.includes("weekend")) picked = DATA.events.filter(e=>e.date.includes("14")||e.date.includes("15")).slice(0,3); // Simulated AI response setTimeout(() => { setMessages(m => [...m, { role:"ai", text:`Here's a plan based on what you said. Three picks tonight in ${DATA.city} that fit your style:` }]); setRecs(picked); setLoading(false); }, 900); }; const suggestions = [ "What's good Saturday night?", "Plan a date — under ₹2000", "Free things to do this weekend", "Comedy + dinner combo", "Quiet vibes, jazz or acoustic", ]; return (
{/* Header */}

AI Concierge

Tell me what you're up for, I'll plan it.
{/* Messages */}
{messages.map((m, i) => (
{m.text}
))} {loading && (
{[0,1,2].map(i =>
)}
)} {/* Recommendations */} {recs.length > 0 && !loading && (
{recs.map((e, i) => (
nav("detail", e.id)} className="card" style={{ cursor:"pointer", padding:0, overflow:"hidden" }}>
#{i+1} pick
{e.title}
{e.date} · {fmtPrice(e.price, currency)}
))}
)} {/* Suggestions */} {messages.length === 1 && (
Try asking
{suggestions.map(s => ( ))}
)}
{/* Input */}
setInput(e.target.value)} onKeyDown={e=>e.key==="Enter"&&send(input)} placeholder="Tell me your vibe…" style={{ flex:1, padding:"12px 14px", background:"var(--surface)", border:"1px solid var(--line)", borderRadius:999, color:"var(--ink)", fontSize:14, outline:"none", fontFamily:"inherit" }} />
); }; // ─── NOTIFICATIONS ─────────────────────────────────────────────── const NotificationsScreen = ({ tweaks, isMobile, nav }) => { const items = [ { type:"reminder", icon:"bell", t:"Tonight: Anoushka Shankar at NCPA", s:"Doors at 7 PM · Show your QR at gate", time:"2h ago", urgent:true }, { type:"social", icon:"users", t:"Ananya is going to The Daily Standup", s:"4 of your friends are interested · 14 Jun", time:"5h ago" }, { type:"new", icon:"sparkle", t:"New: BLOT Wknd at antiSOCIAL", s:"Matches your 'electronic' interest · 21 Jun", time:"1d ago" }, { type:"price", icon:"bolt", t:"Lower Parel Lit Fest — selling fast", s:"Last 12 tickets · You saved this", time:"1d ago" }, { type:"reminder", icon:"calendar", t:"Reminder: Add Sunday market to calendar", s:"15 Jun · 10 AM at Bandra", time:"2d ago" }, { type:"social", icon:"heart", t:"Rohan saved 3 events you might like", s:"Tap to see picks", time:"3d ago" }, ]; return (
Inbox

Notifications

{items.map((n, i) => { const Icon = I[n.icon]; return (
{n.urgent && }
{n.t}
{n.s}
{n.time}
); })}
); }; window.TicketsScreen = TicketsScreen; window.ProfileScreen = ProfileScreen; window.AIScreen = AIScreen; window.NotificationsScreen = NotificationsScreen;