import { ChevronDown, ChevronRight, GitBranch, Pencil } from "lucide-react"; import { useState } from "react"; import { useTranslation } from "react-i18next"; import type { MobileWorkflowNodeSummary } from "./workflow-mobile-graph"; import "./MobileWorkflowGraphView.css"; interface MobileWorkflowGraphViewProps { rows: MobileWorkflowNodeSummary[]; selectedNodeId?: string | null; selectedEdgeId?: string | null; onSelectNode: (id: string) => void; onSelectEdge: (id: string) => void; } function NodeRow({ row, depth, selectedNodeId, selectedEdgeId, onSelectNode, onSelectEdge, }: { row: MobileWorkflowNodeSummary; depth: number; selectedNodeId?: string | null; selectedEdgeId?: string | null; onSelectNode: (id: string) => void; onSelectEdge: (id: string) => void; }) { const { t } = useTranslation("app"); const hasChildren = row.children.length > 0; const [expanded, setExpanded] = useState(depth === 0); const selected = selectedNodeId === row.id; return (