/** * ProjectCard Component * * Displays a project card for the projects grid view. * Shows project status, progress, metrics, and quick info. * * @see Issue #54 */ 'use client'; import { Bot, CircleDot, Clock, MoreVertical, Archive, Play, Pause } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { Skeleton } from '@/components/ui/skeleton'; import { Button } from '@/components/ui/button'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; import { cn } from '@/lib/utils'; import { ProjectStatusBadge } from './StatusBadge'; import { ProgressBar } from './ProgressBar'; import type { ProjectListItem } from '@/lib/api/hooks/useProjects'; export interface ProjectCardProps { /** Project data */ project: ProjectListItem; /** Called when card is clicked */ onClick?: () => void; /** Called when action menu item is selected */ onAction?: (action: 'archive' | 'pause' | 'resume' | 'delete') => void; /** Additional CSS classes */ className?: string; } /** * Complexity indicator dots */ function ComplexityIndicator({ complexity }: { complexity: 'low' | 'medium' | 'high' }) { const levels = { low: 1, medium: 2, high: 3 }; const level = levels[complexity]; return (
{project.description}
)}