import { UserAuth } from './UserAuth'; interface HeaderProps { selectedBodyName?: string; bodyCount: number; cutoffDate?: Date | null; user?: any; onOpenAuth?: () => void; onLogout?: () => void; onNavigateToAdmin?: () => void; } export function Header({ selectedBodyName, bodyCount, cutoffDate, user, onOpenAuth, onLogout, onNavigateToAdmin }: HeaderProps) { // Format cutoff date as YYYY/MM/DD const formattedCutoffDate = cutoffDate ? `${cutoffDate.getFullYear()}/${String(cutoffDate.getMonth() + 1).padStart(2, '0')}/${String(cutoffDate.getDate()).padStart(2, '0')}` : ''; return (
{/* Left: Branding */}
🌌

Cosmo

{formattedCutoffDate && ( ({formattedCutoffDate}) )}

DEEP SPACE EXPLORER

{/* Status Info */}

{selectedBodyName ? ( <> 聚焦: {selectedBodyName} ) : ( <> {bodyCount} 个天体在线 )}

{/* Right: User Auth */} {onOpenAuth && ( )}
); }