"use client"; import { signOut } from "next-auth/react"; import { LogOut } from "lucide-react"; import type { Role } from "@prisma/client"; import { CartIcon } from "./cart-icon"; import { NotificationBell } from "./notification-bell"; const ROLE_LABELS: Record = { TECHNICAL: "Technical", MANNING: "Manning", ACCOUNTS: "Accounts", MANAGER: "Manager", SUPERUSER: "SuperUser", AUDITOR: "Auditor", ADMIN: "Admin", }; const CART_ROLES: Role[] = ["TECHNICAL", "MANNING", "SUPERUSER", "MANAGER"]; interface NotificationItem { id: string; body: string; link: string | null; isRead: boolean; sentAt: string; poId: string | null; } interface HeaderProps { user: { name: string; email: string; role: Role }; initialUnreadCount: number; initialNotifications: NotificationItem[]; } export function Header({ user, initialUnreadCount, initialNotifications }: HeaderProps) { return (
{CART_ROLES.includes(user.role) && }

{user.name}

{ROLE_LABELS[user.role]}

); }