'use client';

import { KanbanBoard } from './Board';
import { useTasks } from '@/hooks/useTasks';
import { Task } from '@/lib/types';

interface BoardContainerProps {
  initialTasks: Task[];
  initialStats: {
    total: number;
    completed: number;
    inProgress: number;
    todo: number;
    completionRate: number;
  };
}

export function KanbanBoardContainer({ initialTasks, initialStats }: BoardContainerProps) {
  const { tasks, loading, createTask, deleteTask } = useTasks(
    { limit: 20 }, 
    { tasks: initialTasks, stats: initialStats }
  );

  return (
    <KanbanBoard 
      tasks={tasks}
      onCreateTask={createTask}
      onDeleteTask={deleteTask}
      loading={loading}
    />
  );
}
