import { Badge } from "../atoms"; import type { Agent } from "../../types"; interface Props { agent: Agent; selected: boolean; onClick: () => void; } function timeAgo(date: string): string { const diff = Date.now() - new Date(date).getTime(); const secs = Math.floor(diff / 1000); if (secs < 5) return "just now"; if (secs < 60) return `${secs}s ago`; if (secs < 3600) return `${Math.floor(secs / 60)}m ago`; return `${Math.floor(secs / 3600)}h ago`; } export default function AgentItem({ agent, selected, onClick }: Props) { return ( ); }