import { Core, type Task, DEFAULT_TASK_STATUSES } from '@backlog-md/core'; import type { KanbanPanelActions, PanelEventEmitter } from '../../../types'; import { type Span } from '../../../telemetry'; /** Per-column pagination state */ export interface ColumnState { tasks: Task[]; total: number; hasMore: boolean; isLoadingMore: boolean; } /** * Status column identifiers - now using actual status values directly * This eliminates the need for status-to-column mapping */ export type StatusColumn = typeof DEFAULT_TASK_STATUSES[keyof typeof DEFAULT_TASK_STATUSES]; /** All status columns in order for rendering */ export declare const STATUS_COLUMNS: StatusColumn[]; /** Status-based column state (computed from source data) */ export interface StatusColumnState { tasks: Task[]; count: number; } /** Active tasks pagination state */ export interface ActiveTasksState { total: number; loaded: number; hasMore: boolean; isLoadingMore: boolean; } export interface UseKanbanDataResult { tasks: Task[]; isLoading: boolean; error: string | null; /** Per-status column pagination state */ columnStates: Map; /** Load more tasks for a specific status column */ loadMore: (status: StatusColumn) => Promise; refreshData: () => Promise; updateTaskStatus: (taskId: string, newStatus: string) => Promise; /** Status columns: To Do, In Progress, Done */ statusColumns: StatusColumn[]; /** Tasks grouped by status (To Do, In Progress, Done) */ tasksByStatus: Map; /** Total tasks pagination state */ totalTasksState: ActiveTasksState; /** Load more tasks */ loadMoreTasks: () => Promise; /** Move task to a new status column (optimistic update - no persistence) */ moveTaskOptimistic: (taskId: string, toColumn: StatusColumn) => void; /** Find a task by ID */ getTaskById: (taskId: string) => Task | undefined; } interface UseKanbanDataOptions { /** Shared Core instance from useBacklogCore (required) */ core: Core | null; /** Actions for file operations */ actions?: KanbanPanelActions; /** Number of tasks to load per page (default: 20) */ tasksLimit?: number; /** Event emitter for panel events */ events?: PanelEventEmitter; /** Parent span for context propagation (e.g., board.session) */ parentSpan?: Span; } /** * Hook for managing kanban board data with lazy loading * * Uses 3-column view based on task status: To Do, In Progress, Done. * Only loads tasks from the tasks/ directory. * * Requires a shared Core instance from useBacklogCore. */ export declare function useKanbanData(options: UseKanbanDataOptions): UseKanbanDataResult; export {}; //# sourceMappingURL=useKanbanData.d.ts.map