'use client' import { useState } from 'react' import { cn } from '@/lib/utils' import { TaskCard } from './task-card' import { Plus } from 'lucide-react' import type { VikunjaTask, VikunjaBucket } from '@/lib/vikunja-client' interface KanbanColumnProps { bucket: VikunjaBucket tasks: VikunjaTask[] onEditTask?: (task: VikunjaTask) => void onToggleDone?: (task: VikunjaTask) => void onDragStart?: (e: React.DragEvent, task: VikunjaTask) => void onDrop?: (bucketId: number) => void onQuickAdd?: (title: string, bucketId: number) => void } export function KanbanColumn({ bucket, tasks, onEditTask, onToggleDone, onDragStart, onDrop, onQuickAdd, }: KanbanColumnProps) { const [isDragOver, setIsDragOver] = useState(false) const [isAdding, setIsAdding] = useState(false) const [quickTitle, setQuickTitle] = useState('') function handleDragOver(e: React.DragEvent) { e.preventDefault() setIsDragOver(true) } function handleDragLeave() { setIsDragOver(false) } function handleDrop(e: React.DragEvent) { e.preventDefault() setIsDragOver(false) onDrop?.(bucket.id) } function handleQuickAdd() { const title = quickTitle.trim() if (title) { onQuickAdd?.(title, bucket.id) setQuickTitle('') setIsAdding(false) } } return (