"use client"; import { X, AlertTriangle, AlertCircle, Info } from "lucide-react"; import { cn } from "@/lib/utils"; import type { CausalNotification } from "@/lib/types"; interface ToastNotificationProps { notification: CausalNotification; onDismiss: (id: string) => void; } const SEVERITY_STYLES = { critical: { container: "border-red-500/50 bg-red-950/80 glow-red", icon: , text: "text-red-300", }, warning: { container: "border-yellow-500/50 bg-yellow-950/80 glow-yellow", icon: , text: "text-yellow-300", }, info: { container: "border-blue-500/50 bg-blue-950/80", icon: , text: "text-blue-300", }, }; export function ToastNotification({ notification, onDismiss }: ToastNotificationProps) { const styles = SEVERITY_STYLES[notification.severity]; return (
{styles.icon} {notification.message}
); } interface ToastContainerProps { notifications: CausalNotification[]; onDismiss: (id: string) => void; } export function ToastContainer({ notifications, onDismiss }: ToastContainerProps) { if (notifications.length === 0) return null; return (
{notifications.map((n) => ( ))}
); }