'use client' import { useRouter } from 'next/navigation' import { useLanguage } from '@/lib/LanguageContext' import { useTheme } from '@/lib/ThemeContext' import { useAlerts, getImportanceColor, getRelativeTime } from '@/lib/AlertsContext' import { LanguageDropdown } from '@/components/LanguageDropdown' import { ThemeToggle } from '@/components/ThemeToggle' interface HeaderBarProps { showAlertsDropdown: boolean setShowAlertsDropdown: (show: boolean) => void } export function HeaderBar({ showAlertsDropdown, setShowAlertsDropdown }: HeaderBarProps) { const router = useRouter() const { t } = useLanguage() const { isDark } = useTheme() const { alerts, unreadCount, markAsRead } = useAlerts() return (

{t('dashboard')}

{t('dashboard_subtitle')}

{/* Search, Language & Actions */}
{/* Notifications Bell with Glow Effect */}
{/* Alerts Dropdown */} {showAlertsDropdown && ( <>
setShowAlertsDropdown(false)} />

Aktuelle Alerts

{unreadCount > 0 && ( {unreadCount} neu )}
{alerts.slice(0, 5).map(alert => ( ))} {alerts.length === 0 && (
📭

Keine Alerts

)}
)}
) }