import type { DeviceStatus } from './schema'

export function getDeviceStatusLabel(status: DeviceStatus): string {
  const labels: Record<DeviceStatus, string> = {
    active: '在线',
    inactive: '离线',
    banned: '已禁用',
  }
  return labels[status] || status
}

export function getDeviceStatusVariant(status: DeviceStatus): 'default' | 'secondary' | 'destructive' | 'outline' {
  const variants: Record<DeviceStatus, 'default' | 'secondary' | 'destructive' | 'outline'> = {
    active: 'default',
    inactive: 'secondary',
    banned: 'destructive',
  }
  return variants[status] || 'secondary'
}
