import React from 'react' import { AlertTriangle, MapPin, Calendar } from 'lucide-react' import { Badge } from "@/app/_components/ui/badge" import { Card, CardContent } from "@/app/_components/ui/card" interface IIncidentCardProps { title: string time: string location: string severity: "Low" | "Medium" | "High" | "Critical" onClick?: () => void showTimeAgo?: boolean } export function IncidentCard({ title, time, location, severity, onClick, showTimeAgo = true }: IIncidentCardProps) { const getBadgeColor = () => { switch (severity) { case "Low": return "bg-green-500/20 text-green-300"; case "Medium": return "bg-yellow-500/20 text-yellow-300"; case "High": return "bg-orange-500/20 text-orange-300"; case "Critical": return "bg-red-500/20 text-red-300"; default: return "bg-gray-500/20 text-gray-300"; } }; const getBorderColor = () => { switch (severity) { case "Low": return "border-l-green-500"; case "Medium": return "border-l-yellow-500"; case "High": return "border-l-orange-500"; case "Critical": return "border-l-red-500"; default: return "border-l-gray-500"; } }; return (

{title}

{severity}
{location}
{showTimeAgo ? ( time ) : ( <> {time} )}
); }