import { Handle, Position, NodeResizer, type NodeProps, type Node } from '@xyflow/react' import { Layers } from 'lucide-react' import type { NodeData, NodeStatus } from '@/types' import { resolveNodeColors } from '@/utils/nodeColors' import { BaseNode } from './BaseNode' const STATUS_COLORS: Record = { online: '#39d353', offline: '#f85149', pending: '#e3b341', unknown: '#8b949e', } export function ProxmoxGroupNode(props: NodeProps>) { const { data, selected } = props const colors = resolveNodeColors(data) // Render as a regular node when container mode is disabled if (data.container_mode === false) { return } const statusColor = STATUS_COLORS[data.status] const isOnline = data.status === 'online' const glow = colors.border return ( <> {/* Group border */}
{/* Header bar */}
{data.label} {data.ip && ( {data.ip} )}
{/* Status dot */}
{/* Inner area — React Flow places children here */}
) }