import { Handle, Position, type NodeProps, type Node } from '@xyflow/react' import { type LucideIcon } from 'lucide-react' import type { NodeData, NodeStatus } from '@/types' import { resolveNodeColors } from '@/utils/nodeColors' const STATUS_COLORS: Record = { online: '#39d353', offline: '#f85149', pending: '#e3b341', unknown: '#8b949e', } interface BaseNodeProps extends NodeProps> { icon: LucideIcon } export function BaseNode({ data, selected, icon: Icon }: BaseNodeProps) { const colors = resolveNodeColors(data) const statusColor = STATUS_COLORS[data.status] const isOnline = data.status === 'online' return (
{/* Icon */}
{/* Details */}
{data.label}
{data.ip && (
{data.ip}
)}
{/* Status dot */}
) }