"use client";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { cn } from "@stigmer/theme";
/**
 * Inspector for a selected edge (connection between two tasks).
 *
 * Shows source/target, label, port, and a delete action.
 *
 * @since T10 (Inspector Panel Refactor) — extracted from WorkflowInspectorPanel
 */
export function EdgeInspector({ edge, graph, onDeleteEdge, className, }) {
    const sourceNode = graph.nodes.find((n) => n.id === edge.source);
    const targetNode = graph.nodes.find((n) => n.id === edge.target);
    return (_jsxs("div", { className: cn("flex h-full flex-col gap-4 p-3", className), children: [_jsx("h3", { className: "text-[11px] font-semibold uppercase tracking-wide text-[var(--stgm-muted-foreground,#737373)]", children: "Connection" }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "flex items-center gap-2 text-xs", children: [_jsx("span", { className: "font-medium text-[var(--stgm-foreground,#1a1a2e)]", children: sourceNode?.taskName ?? edge.source }), _jsx("span", { className: "text-[var(--stgm-muted-foreground,#737373)]", children: "\u2192" }), _jsx("span", { className: "font-medium text-[var(--stgm-foreground,#1a1a2e)]", children: targetNode?.taskName ?? edge.target })] }), edge.label && (_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-[11px] text-[var(--stgm-muted-foreground,#737373)]", children: "Label:" }), _jsx("span", { className: "text-xs text-[var(--stgm-foreground,#1a1a2e)]", children: edge.label })] })), edge.sourceHandle && (_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-[11px] text-[var(--stgm-muted-foreground,#737373)]", children: "Port:" }), _jsx("span", { className: "text-xs text-[var(--stgm-foreground,#1a1a2e)]", children: edge.sourceHandle })] }))] }), onDeleteEdge && (_jsx("button", { type: "button", onClick: () => onDeleteEdge(edge.id), className: "self-start rounded px-2 py-1 text-xs text-[var(--stgm-destructive,#ef4444)] hover:bg-[var(--stgm-destructive,#ef4444)]/10", children: "Delete connection" }))] }));
}
//# sourceMappingURL=EdgeInspector.js.map