import { TaskPriorityContextMenu } from "./task-priority-context-menu"; import { TaskMoveContextMenuItems, type TaskMoveStep, type TaskMoveWorkflow, } from "./task-move-context-menu"; import { TaskArchiveItem, TaskDeleteItem } from "./task-switcher-action-items"; import { TaskPluginLinkMenu, type selectTaskLinkActions } from "./task-switcher-link-menu"; import type { TaskSwitcherItem } from "./task-switcher-types"; import type { TaskPriority } from "@/lib/types/http"; export type TaskManagementMenuProps = { task: TaskSwitcherItem; workflows: TaskMoveWorkflow[]; stepsByWorkflowId: Record; disabled?: boolean; onPriority: (priority: TaskPriority) => void; onMove: (workflowId: string, stepId: string) => void; onArchive: () => void; onDelete: () => void; closeMenu: () => void; linkActions: Partial>; }; /** Focused task management composition; the full switcher retains its additional actions. */ export function TaskManagementMenu({ task, workflows, stepsByWorkflowId, disabled, onPriority, onMove, onArchive, onDelete, closeMenu, linkActions, }: TaskManagementMenuProps) { return ( <> { if (task.workflowId) onMove(task.workflowId, stepId); }} onSendToWorkflow={onMove} /> ); }