"use client"; import { Card } from "@mcpengine/ui"; import Link from "next/link"; export type ProjectStatus = "draft" | "analyzed" | "generated" | "tested" | "deployed"; export interface Project { id: string; name: string; status: ProjectStatus; toolCount: number; updatedAt: Date; } const statusConfig: Record = { draft: { label: "Draft", color: "bg-gray-600 text-gray-200" }, analyzed: { label: "Analyzed", color: "bg-yellow-600/20 text-yellow-400" }, generated: { label: "Generated", color: "bg-blue-600/20 text-blue-400" }, tested: { label: "Tested", color: "bg-emerald-600/20 text-emerald-400" }, deployed: { label: "Deployed", color: "bg-indigo-600/20 text-indigo-400" }, }; function relativeTime(date: Date): string { const seconds = Math.floor((Date.now() - date.getTime()) / 1000); if (seconds < 60) return "just now"; const minutes = Math.floor(seconds / 60); if (minutes < 60) return `${minutes}m ago`; const hours = Math.floor(minutes / 60); if (hours < 24) return `${hours}h ago`; const days = Math.floor(hours / 24); if (days < 30) return `${days}d ago`; return date.toLocaleDateString(); } export function ProjectCard({ project }: { project: Project }) { const status = statusConfig[project.status]; return (

{project.name}

{status.label}
{project.toolCount} tools {relativeTime(project.updatedAt)}
); }