import { CalendarDays, MapPin } from "lucide-react"; import type { EventSession } from "@/types"; import { activeSessions, formatSessionWhen, sessionLabel } from "@/lib/sessions"; // The schedule of a multi-day event on its public page: past sessions greyed out, // cancelled ones struck through, and the next one highlighted. export function SessionSchedule({ sessions, defaultLocation }: { sessions: EventSession[]; defaultLocation?: string | null }) { const now = Date.now(); const sorted = [...sessions].sort((a, b) => new Date(a.startsAt).getTime() - new Date(b.startsAt).getTime()); const next = activeSessions(sessions).find(s => new Date(s.endsAt).getTime() > now); const count = activeSessions(sessions).length; return (