"use client"; import { Badge } from "@/shared/components/ui/badge"; import { ToggleGroup, ToggleGroupItem, } from "@/shared/components/ui/toggle-group"; import type { NotificationViewMode } from "./types"; type NotificationBellHeaderProps = { hasAnySourceItems: boolean; headerCountLabel: string; hasDashboardNotificationItems: boolean; viewMode: NotificationViewMode; hasArchivedItems: boolean; archivedDashboardCount: number; onViewModeChange: (viewMode: NotificationViewMode) => void; }; export function NotificationBellHeader({ hasAnySourceItems, headerCountLabel, hasDashboardNotificationItems, viewMode, hasArchivedItems, archivedDashboardCount, onViewModeChange, }: NotificationBellHeaderProps) { return (
Notificações {hasAnySourceItems ? ( {headerCountLabel} ) : null}
{hasDashboardNotificationItems ? (
{ if (!value) return; if (value === "archived" && !hasArchivedItems) return; onViewModeChange(value as NotificationViewMode); }} variant="outline" size="sm" className="w-full rounded-md bg-muted/30 p-0.5" aria-label="Filtro da lista de notificações" > Ativas Arquivadas {hasArchivedItems ? ` (${archivedDashboardCount})` : ""}
) : null}
); }