import { Trash2 } from "lucide-react"; import type { NotificationItem } from "../../api/notifications"; import { useTranslation } from "../../hooks/useTranslation"; import { presentNotification } from "../../lib/notificationPresenter"; import { cn } from "../../lib/utils"; const formatNotificationTimestamp = (value: string, locale: string) => { const date = new Date(value); if (Number.isNaN(date.getTime())) { return value; } return new Intl.DateTimeFormat(locale === "fa" ? "fa-IR" : "en-US", { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit", }).format(date); }; export function NotificationList({ notifications, emptyLabel, onClick, onDelete, className = "", }: { notifications: NotificationItem[]; emptyLabel: string; onClick: (notification: NotificationItem) => void; onDelete: (notification: NotificationItem) => void; className?: string; }) { const { t, lang } = useTranslation(); if (notifications.length === 0) { return (