'use client'; import { AnimatePresence } from 'framer-motion'; import { KANBAN_STATUSES } from '../../lib/kanban'; import type { BeadIssue } from '../../lib/types'; import { KanbanCard } from './kanban-card'; interface KanbanBoardProps { columns: Record<(typeof KANBAN_STATUSES)[number], BeadIssue[]>; selectedIssueId: string | null; onSelect: (issue: BeadIssue) => void; } const STATUS_META: Record<(typeof KANBAN_STATUSES)[number], { label: string; dot: string }> = { open: { label: 'Open', dot: 'bg-sky-300' }, in_progress: { label: 'In Progress', dot: 'bg-amber-300' }, blocked: { label: 'Blocked', dot: 'bg-rose-300' }, deferred: { label: 'Deferred', dot: 'bg-slate-300' }, closed: { label: 'Done', dot: 'bg-emerald-300' }, }; export function KanbanBoard({ columns, selectedIssueId, onSelect }: KanbanBoardProps) { return (
{KANBAN_STATUSES.map((status) => (
{STATUS_META[status].label} {columns[status].length}
{columns[status].map((issue) => ( ))}
))}
); }