/** * @file app/(app)/dashboard/column/ColumnHeader.tsx * @description Component rendering the column header with title, color indicator, item count, and add button with pre-filled status. */ "use client"; import { Plus } from "lucide-react"; import { useRouter } from "next/navigation"; import { TaskStatus } from "@/lib/types/task"; /** * Properties for the ColumnHeader component. * * @interface ColumnHeaderProps * @property {TaskStatus} id - The unique identifier/status of the column. * @property {string} title - The title of the column. * @property {string} [color] - Tailwind CSS color class for the status indicator dot. * @property {number} count - The number of tasks currently inside this column. */ interface ColumnHeaderProps { id: TaskStatus; title: string; color?: string; count: number; } /** * Renders the header section of a column, displaying a color-coded status indicator, * the column name, the total task count badge, and a button to add new tasks pre-filled with the column status. * * @param {ColumnHeaderProps} props - The component props. * @returns {JSX.Element} The rendered column header component. */ export default function ColumnHeader({ id, title, color = "bg-primary", count, }: ColumnHeaderProps) { const router = useRouter(); return (

{title}

{count}
); }