import{BadgeCheck,CalendarDays,Clock,MapPin,MessageCircle,ShieldCheck,TicketCheck}from"lucide-react";import type{CSSProperties}from"react";import{notFound}from"next/navigation";import{ChatWidget}from"../../../components/chat-widget";import{ShareButton}from"../../../components/share-button";import{SiteFooter,SiteHeader}from"../../../components/site-shell";import{events,money}from"../../../lib/data";
export function generateStaticParams(){return events.map(e=>({slug:e.slug}))}
export default async function EventPage({params}:{params:Promise<{slug:string}>}){const{slug}=await params;const e=events.find(x=>x.slug===slug);if(!e)notFound();return <div><SiteHeader/><main className="page-wrap event-page"><div className="event-detail-grid"><section className="event-detail-main"><div className="event-hero-poster" style={{"--poster":e.poster,"--accent":e.accent}as CSSProperties}><span className="poster-category">{e.category}</span><span className="poster-orbit orbit-one"/><span className="poster-orbit orbit-two"/><span className="poster-type">ONE NIGHT<br/>ONLY</span><span className="poster-date"><b>{e.day}</b><small>{e.month}</small></span></div><div className="detail-copy"><div className="event-owner">Presented by <b>{e.seller}</b>{e.sellerVerified&&<BadgeCheck size={17}/>}</div><h1>{e.title}</h1><div className="detail-facts"><span><CalendarDays size={17}/>{e.date}</span><span><Clock size={17}/>{e.time}</span><span><MapPin size={17}/>{e.venue}, {e.city}</span></div><div className="tag-row">{e.tags.map(t=><span key={t}>{t}</span>)}</div><p className="detail-description">{e.description} Every ticket includes secure mobile delivery and access to EasyPay support before and after the event.</p><div className="detail-notes"><article><TicketCheck size={21}/><div><b>Mobile entry</b><p>Your unique ticket appears in your account after payment.</p></div></article><article><ShieldCheck size={21}/><div><b>Purchase protection</b><p>Refund and event-change support under the stated policy.</p></div></article></div></div></section><aside><div className="buy-panel"><h2>Choose your experience</h2><p>All-in prices include mandatory fees.</p>{e.tickets.map(t=><a className="tier-card" href={`/checkout/${e.slug}?tier=${encodeURIComponent(t.name)}`} key={t.name}><div><h3>{t.name}</h3><p>{t.description}</p><small className={t.remaining<10?"low-stock":""}>{t.remaining<10?`Only ${t.remaining} left`:`${t.remaining} available`}</small></div><div className="tier-price"><b>{money(t.price+t.fee)}</b><small>total</small></div></a>)}<a className="action-primary" href={`/checkout/${e.slug}`}>Get tickets</a><div className="fee-note">No surprise mandatory fees at checkout.</div><div className="share-row"><ShareButton/><a href="/messages"><MessageCircle size={16}/> Message seller</a></div></div></aside></div></main><ChatWidget seller={e.seller}/><SiteFooter/></div>}
