import type { NotificationItem as Notification } from "@/app/(dashboard)/notifications/notification.types";
import { NotificationItem } from "./NotificationItem";

export function NotificationList({
  notifications,
  onSelect,
}: {
  notifications: Notification[];
  onSelect: (notification: Notification) => void;
}) {
  return (
    <>
      {notifications.map((notification) => (
        <NotificationItem
          key={notification.id}
          notification={notification}
          onClick={onSelect}
        />
      ))}
    </>
  );
}
