blob: 55d0b7a49b2005bb391b639c861d2a2f4c4284de [file] [log] [blame]
giod0026612025-05-08 13:00:36 +00001import { NodeRect } from "./node-rect";
gio69148322025-06-19 23:16:12 +04002import { nodeLabel } from "@/lib/state";
gioaba9a962025-04-25 14:19:40 +00003import { Handle, Position } from "@xyflow/react";
gio69148322025-06-19 23:16:12 +04004import { NetworkNode } from "config";
gioaba9a962025-04-25 14:19:40 +00005
6export function NodeNetwork(node: NetworkNode) {
giod0026612025-05-08 13:00:36 +00007 const { id, selected } = node;
8 return (
gio69148322025-06-19 23:16:12 +04009 <NodeRect id={id} selected={selected} node={node} state={node.data.state}>
giod0026612025-05-08 13:00:36 +000010 <div style={{ padding: "10px 20px" }}>
11 {nodeLabel(node)}
12 <Handle
13 id="subdomain"
14 type={"target"}
15 position={Position.Bottom}
16 isConnectableStart={true}
17 isConnectableEnd={true}
18 isConnectable={true}
19 />
20 </div>
21 </NodeRect>
22 );
gioaba9a962025-04-25 14:19:40 +000023}