// Tauri 命令类型定义

export interface DeviceInfo {
  device_id: string;
  device_id_formatted: string;
  verification_code: string;
  device_name: string;
  os_type: string;
}

export interface CurrentUser {
  id: string;
  username: string;
  email: string | null;
}

export interface Device {
  id: string;
  device_id: string;
  name: string;
  os_type: string;
  os_version: string;
  is_online: boolean;
  last_seen: string;
}

export interface HistoryItem {
  id: string;
  device_id: string;
  device_name: string;
  started_at: string;
  ended_at: string | null;
  duration: string | null;
  connection_type: string;
}

export interface ConnectRequest {
  device_id: string;
  verification_code: string;
}

export type ConnectionState =
  | { type: 'Disconnected' }
  | { type: 'Connecting' }
  | { type: 'Connected'; target_device_id: string; target_device_name: string; connection_type: string }
  | { type: 'BeingControlled'; controller_device_id: string };

export interface ClientConfig {
  server_url: string;
  device_name: string;
  quality: QualityConfig;
  auto_start: boolean;
  launch_on_boot: boolean;
}

export interface QualityConfig {
  frame_rate: number;
  resolution_scale: number;
  image_quality: number;
  hardware_acceleration: boolean;
}
