import type { Sequence } from "../../types";

/**
 * Node in the dependency graph
 */
export interface GraphNode {
	id: string;
	title: string;
	status: string;
	priority?: "high" | "medium" | "low";
	labels: string[];
	dependencies: string[];
	dependents: string[]; // Tasks that depend on this one (reverse edges)
	sequenceIndex?: number; // From computeSequences()
}

/**
 * Edge connecting two nodes (source depends on target, or target depends on source)
 * Direction: source -> target means "target depends on source"
 */
export interface GraphEdge {
	source: string; // Task ID that is depended upon
	target: string; // Task ID that has the dependency
}

/**
 * Complete dependency graph structure
 */
export interface DependencyGraph {
	nodes: GraphNode[];
	edges: GraphEdge[];
	sequences: Sequence[];
	unsequenced: GraphNode[];
}

/**
 * Filter options for the dependency graph
 */
export interface GraphFilters {
	status?: string[];
	priority?: Array<"high" | "medium" | "low">;
	labels?: string[];
	showCompleted?: boolean;
}
