"use client"; import { useDroppable } from "@dnd-kit/core"; import { motion, AnimatePresence } from "framer-motion"; import { TodoCard } from "@/components/todo-card"; import type { Todo, Tag } from "@/services/api-types"; interface KanbanColumnProps { id: string; title: string; todos: Todo[]; tags: Tag[]; isLoading: boolean; } export function KanbanColumn({ id, title, todos, tags, isLoading, }: KanbanColumnProps) { const { setNodeRef, isOver } = useDroppable({ id, }); const getColumnColor = () => { switch (id) { case "pending": return "border-yellow-200 bg-yellow-50 dark:bg-yellow-950/20 dark:border-yellow-900/50"; case "in-progress": return "border-blue-200 bg-blue-50 dark:bg-blue-950/20 dark:border-blue-900/50"; case "completed": return "border-green-200 bg-green-50 dark:bg-green-950/20 dark:border-green-900/50"; default: return "border-gray-200 bg-gray-50 dark:bg-gray-800/20 dark:border-gray-700"; } }; return (

{title}

{todos.length}
{isLoading ? ( Array(3) .fill(0) .map((_, i) => (
)) ) : todos.length === 0 ? (

No todos in this column

Drag and drop tasks here

) : ( {todos.map((todo) => ( {}} onDelete={() => {}} isDraggable={true} /> ))} )}
); }