import { useState } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import { useAuthStore } from '@/features/auth/store/authStore'; import { useUser } from '@/features/auth/hooks/useUser'; import { useUIStore } from '@/stores/ui'; import { useTranslation } from '@/hooks/useTranslation'; import { EmailVerificationBadge } from '@/features/auth/components/EmailVerificationBadge'; import { NotificationMenu } from '@/components/notifications/NotificationMenu'; import { RateLimitIndicator } from '@/components/RateLimitIndicator'; import { Button } from '@/components/ui/button'; import { FocusTrap } from '@/components/ui/focus-trap'; import { Tooltip } from '@/components/ui/tooltip'; import { cn } from '@/lib/utils'; import { User, Settings, LogOut, Moon, Sun, Monitor, Search, Command, Menu, } from 'lucide-react'; import { FeatureHighlight } from '@/components/ui/feature-highlight'; import type { BaseComponentProps } from '../types'; export interface HeaderProps extends BaseComponentProps { } export function Header(_props: HeaderProps) { const [isUserMenuOpen, setIsUserMenuOpen] = useState(false); const { logout } = useAuthStore(); const { data: user } = useUser(); const { theme, setTheme, sidebarOpen, setSidebarOpen } = useUIStore(); const { t } = useTranslation(); const navigate = useNavigate(); const handleLogout = async () => { await logout(); navigate('/login'); }; const toggleTheme = () => { const newTheme = theme === 'light' ? 'dark' : theme === 'dark' ? 'system' : 'light'; setTheme(newTheme); }; const getThemeIcon = () => { switch (theme) { case 'light': return ; case 'dark': return ; default: return ; } }; return (
{/* Mobile Sidebar Toggle */} {/* Search — Spotify-style: subtle, rounded */}
K
{/* Right Actions */}
Online
{/* User — compact pill */}
{isUserMenuOpen && ( setIsUserMenuOpen(false)}>

{user?.username}

{user?.email}

{!user?.is_verified && (
)}
Profil Paramètres
)}
); }