import { Shield, ArrowLeft, Settings, RefreshCw } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { Link, useLocation } from 'react-router-dom'; import { ThemeToggle } from '@/components/theme/ThemeToggle'; import { AuthButtons } from '@/components/auth/AuthButtons'; import { NotificationCenter } from '@/components/notifications/NotificationCenter'; import { useUserRole } from '@/hooks/useUserRole'; import { useAuth } from '@/hooks/useAuth'; export function AdminHeader({ onRefresh }: { onRefresh?: () => void }) { const { permissions } = useUserRole(); const { user } = useAuth(); const location = useLocation(); const isSettingsPage = location.pathname === '/admin/settings'; const backLink = isSettingsPage ? '/admin' : '/'; const backText = isSettingsPage ? 'Back to Admin' : 'Back to ThrillWiki'; const pageTitle = isSettingsPage ? 'Admin Settings' : 'Admin Dashboard'; return (
{/* Left Section - Navigation */}

Admin {pageTitle}

{/* Right Section - Admin actions */}
{permissions?.role_level === 'superuser' && !isSettingsPage && ( )} {user && }
); }