export function formatUptime(seconds: number): string {
  const days = Math.floor(seconds / 86400)
  const hours = Math.floor((seconds % 86400) / 3600)
  const minutes = Math.floor((seconds % 3600) / 60)
  const parts: string[] = []
  if (days > 0) parts.push(`${days}d`)
  if (hours > 0) parts.push(`${hours}h`)
  parts.push(`${minutes}m`)
  return parts.join(' ')
}

export function statusColor(status: string): string {
  switch (status) {
    case 'online':
      return 'bg-rig-success'
    case 'offline':
      return 'bg-rig-danger'
    case 'error':
      return 'bg-rig-danger'
    case 'connecting':
      return 'bg-rig-warning'
    default:
      return 'bg-rig-dark-500'
  }
}
