import React from 'react'; import { Clock, X } from 'lucide-react'; export interface SharedLocationPhoto { id: string; url: string; uploaderName: string; uploaderAvatar?: string; isGuest: boolean; capturedAt: string; description?: string; } interface TimelineProps { locationName: string; photos: SharedLocationPhoto[]; onSelectPhoto: (photoId: string) => void; onClose: () => void; } export const LocationTimelineSheet: React.FC = ({ locationName, photos, onSelectPhoto, onClose }) => { // Sort photos chronologically by capture timestamp const chronologicalPhotos = [...photos].sort( (a, b) => new Date(b.capturedAt).getTime() - new Date(a.capturedAt).getTime() ); return (
{/* Dynamic Header Drag/Close Strip */}

{locationName || "Hành trình tại địa điểm"}

Tổng hợp {photos.length} khoảnh khắc từ cộng đồng

{/* THE CHRONOLOGICAL TIMELINE STREAM CANVAS */}
{/* Vertical Timeline Track Line */}
{chronologicalPhotos.map((photo) => (
{/* Timeline Node Circle Asset Indicator */}
{/* Core Content Card Box */}
{/* Meta row identifier */}
{photo.uploaderAvatar ? ( ) : ( photo.uploaderName.charAt(0).toUpperCase() )}
{photo.uploaderName} {photo.isGuest && Khách}
{new Date(photo.capturedAt).toLocaleDateString('vi-VN')}
{/* Clickable Card Thumbnail Container */}
onSelectPhoto(photo.id)} className="w-full aspect-video rounded-xl overflow-hidden bg-slate-900 relative cursor-pointer active:scale-[0.99] transition-transform" > Timeline view
{photo.description &&

{photo.description}

}
))}
); };