// RemoteRig TypeScript types

/** Full camera status from GET /api/v1/cameras and SSE events */
export interface CameraStatus {
  camera_id: string
  friendly_name: string
  battery_pct: number | null
  video_remaining_sec: number | null
  recording: boolean
  mode: string
  resolution: string
  fps: number
  online: boolean
  last_seen: string // ISO 8601
}

/** SSE event envelope from /api/v1/events/stream */
export interface SSEEvent {
  type: string
  ts: string
  payload?: unknown
}

export interface Camera {
  id: string
  name: string
  streamUrl: string
  status: 'online' | 'offline' | 'error' | 'connecting'
  position?: string
  fps: number
  resolution?: string
  recording: boolean
}

export interface CameraFeed {
  cameraId: string
  thumbnailUrl?: string
  frameRate: number
  bitrate?: string
}

export interface SystemHealth {
  cpuUsage: number
  memoryUsage: number
  gpuUsage: number
  temperature: number
  uptime: string
}

export interface StreamConfig {
  width: number
  height: number
  fps: number
  codec: string
  bitrate: string
}
