import { Handle, Position, NodeResizer, type NodeProps, type Node } from '@xyflow/react' import { Layers } from 'lucide-react' import type { NodeData } from '@/types' import { resolveNodeColors } from '@/utils/nodeColors' import { useThemeStore } from '@/stores/themeStore' import { THEMES } from '@/utils/themes' import { BaseNode } from './BaseNode' export function ProxmoxGroupNode(props: NodeProps>) { const { data, selected } = props const activeTheme = useThemeStore((s) => s.activeTheme) const theme = THEMES[activeTheme] const colors = resolveNodeColors(data, activeTheme) // Render as a regular node when container mode is disabled if (data.container_mode === false) { const proxmoxAccent = theme.colors.nodeAccents.proxmox.border return ( <> ) } const statusColor = theme.colors.statusColors[data.status] const isOnline = data.status === 'online' const glow = colors.border const proxmoxAccent = theme.colors.nodeAccents.proxmox.border return ( <> {/* Group border */}
{/* Header bar */}
{data.label} {data.ip && ( {data.ip} )}
{/* Status dot */}
{/* Inner area — React Flow places children here */}
{/* Cluster handles */} ) }