import React from "react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Info } from "lucide-react"; import { getNodeIconWithSize } from "@/lib/node-icons"; interface LegendItem { type: string; color: string; } const nodeTypes: LegendItem[] = [ { type: "Input", color: "#8b5cf6" }, // Left side { type: "Task", color: "#3b82f6" }, // Left-center { type: "Agent", color: "#ff6b6b" }, // Center { type: "Tool", color: "#10b981" }, // Right-center { type: "Output", color: "#f59e0b" }, // Right side { type: "Human", color: "#ec4899" }, // Supervisor (top) ]; interface GraphLegendProps { className?: string; containerBounds?: { width: number; height: number }; } export function GraphLegend({ className = "" }: GraphLegendProps) { return (
Graph Legend {/* Node Types */}
Nodes
Workflow: Left → Right
{nodeTypes.map((item) => (
{item.type} {item.type}
))}
{/* Highlight Zones */}
Zones
Main Flow
Isolated
Failures
); }