import { groupItineraryByDay } from "@/lib/itinerary"; interface ItineraryItem { day: number; startTime: string; endTime: string | null; activity: string; order: number; } interface TripProgramBlockProps { meetingPoint: string | null; itinerary: string | null; itineraryItems: ItineraryItem[]; whatsIncluded: string | null; whatsExcluded: string | null; } export function TripProgramBlock({ meetingPoint, itinerary, itineraryItems, whatsIncluded, whatsExcluded, }: TripProgramBlockProps) { const hasStructuredItinerary = itineraryItems.length > 0; const hasLegacyItinerary = !hasStructuredItinerary && !!itinerary; const hasAny = meetingPoint || hasStructuredItinerary || hasLegacyItinerary || whatsIncluded || whatsExcluded; if (!hasAny) return null; const grouped = hasStructuredItinerary ? groupItineraryByDay(itineraryItems) : null; return (
{meetingPoint}
Hari {day}
{itinerary}
{whatsIncluded}
{whatsExcluded}