import type { ReactNode } from 'react' import { cn } from '@/lib/utils' export type NodeStatus = 'online' | 'offline' | 'degraded' | 'unknown' const STATUS_BORDER_COLORS: Record = { online: 'border-emerald-400', offline: 'border-red-400', degraded: 'border-yellow-400', unknown: '', } const STATUS_GLOW: Record = { online: 'shadow-[0_0_6px_rgba(52,211,153,0.15)]', offline: 'shadow-[0_0_6px_rgba(248,113,113,0.15)]', degraded: 'shadow-[0_0_6px_rgba(250,204,21,0.15)]', unknown: '', } interface NodeStatusIndicatorProps { status?: NodeStatus children: ReactNode className?: string } export function NodeStatusIndicator({ status = 'unknown', children, className }: NodeStatusIndicatorProps) { if (status === 'unknown') { return <>{children} } return (
{children}
) }