import { useState } from "react"; import { Box, Drawer } from "@mui/material"; import { Bell, X } from "lucide-react"; import { Text } from "@/components/ui/text"; import { NotificationFeedActions } from "./notification-feed-actions"; import { NotificationFeedList } from "./notification-feed-list"; import { useNotificationCenter } from "./use-notification-center"; export function NotificationBell() { const [open, setOpen] = useState(false); const center = useNotificationCenter(() => setOpen(false)); const unreadCount = center.unreadIds.size; return ( <> setOpen(true)} title="Notifications" aria-label={unreadCount > 0 ? `Notifications, ${unreadCount} unread` : "Notifications"} sx={{ position: "relative", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, width: 38, height: 38, borderRadius: "6px", border: "none", cursor: "pointer", overflow: "visible", backgroundColor: "var(--color-header-surface)", color: "var(--color-header-icon)", "&:hover": { backgroundColor: "var(--color-header-surface-hover)" }, }} > {unreadCount > 0 && ( {unreadCount} )} setOpen(false)} slotProps={{ paper: { sx: { width: 420, background: "var(--color-bg-surface)" } } }} > Notifications setOpen(false)} title="Close" aria-label="Close notifications" className="shrink-0 cursor-pointer transition-opacity hover:opacity-70" style={{ color: "var(--color-text-muted)" }} > > ); }