"use client"; import { type NodeProps } from "@xyflow/react"; import { DatabaseIcon } from "lucide-react"; import { NodeShell } from "./NodeShell"; const GAME_DATA_FIELDS = [ { value: "structure_health", label: "Structure Health" }, { value: "structure_storage", label: "Structure Storage" }, { value: "deliveries_pending", label: "Pending Deliveries" }, { value: "deliveries_completed", label: "Completed Deliveries" }, { value: "resources_total", label: "Total Resources" }, { value: "faction_reputation", label: "Faction Reputation" }, { value: "player_count", label: "Player Count" }, { value: "tick_count", label: "Current Tick" }, ]; export function GameDataNode({ data }: NodeProps) { const d = data as { field?: string }; const fieldLabel = GAME_DATA_FIELDS.find((f) => f.value === d.field)?.label ?? "Select field"; return (
Game Data
{fieldLabel}
); }