import { Droppable } from "@hello-pangea/dnd"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { useTranslate } from "ra-core"; import { cn } from "@/lib/utils"; import { translateChoice } from "@/i18n/utils"; import { useConfigurationContext } from "../root/ConfigurationContext"; import type { Task } from "../types"; import { findStatusLabel } from "./tasks"; import { TaskCard } from "./TaskCard"; export const TaskColumn = ({ status, tasks, isDropDisabled, isCollapsed, onToggleCollapse, }: { status: string; tasks: Task[]; isDropDisabled?: boolean; isCollapsed?: boolean; onToggleCollapse?: (statusId: string) => void; }) => { const { taskStatuses } = useConfigurationContext(); const translate = useTranslate(); const rawLabel = findStatusLabel(taskStatuses, status); const label = translateChoice(translate, "crm.task.status", status, rawLabel); const count = tasks.length; const collapsed = isCollapsed ?? false; return (