"use client"; /** * Reusable field components shared across every per-node form. * * `NodeKeySelect` — picks a node from the flow's node list, rendered * with the source node's icon so the dropdown reads as * "destination = ◇ menu" rather than an opaque slug. * * `NextNodeRow` — wraps NodeKeySelect with a label; the most common * per-node form row ("after this node, advance to…"). * * `TextRow` — wraps Input or Textarea behind a label. Pure UI sugar * to keep per-node forms uncluttered. * * Lives in src/components/flows/forms/ so both the list view's * collapsed-card editor and the canvas view's side-panel editor * (introduced in this PR) mount the exact same form components. */ import { Input } from "@/components/ui/input"; import { Textarea } from "@/components/ui/textarea"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { cn } from "@/lib/utils"; import { NODE_META, type BuilderNode } from "../shared"; export function TextRow({ label, value, onChange, rows = 1, }: { label: string; value: string; onChange: (v: string) => void; rows?: number; }) { return (