"use client";
/**
* NotificationBell — header affordance for signed-in users. Links to the
* /notifications page and shows a dot when there are unread items.
*
* The unread count is read from NotificationsProvider, which seeds it from
* the REST endpoint and keeps it live over the Soketi WebSocket. Visiting
* the page marks everything read and clears the badge.
*/
import Link from "next/link";
import { Bell } from "lucide-react";
import { useNotifications } from "@/components/notifications/notifications-provider";
export function NotificationBell() {
const { unread } = useNotifications();
return (
0 ? `Notifications (${unread} unread)` : "Notifications"
}
className="relative size-9 inline-flex items-center justify-center rounded-lg text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
{unread > 0 ? (
) : null}
);
}