export enum NetworkConnectionStatus {
  NETWORK_STATUS_IDLE = 0,
  NETWORK_STATUS_NO_SSID_AVAIL = 1,
  NETWORK_STATUS_CONNECTED = 3,
  NETWORK_STATUS_CONNECT_FAILED = 4,
  NETWORK_STATUS_CONNECTION_LOST = 5,
  NETWORK_STATUS_DISCONNECTED = 6,
  NETWORK_STATUS_NO_SHIELD = 255
}

export enum WiFiEncryptionType {
  WIFI_AUTH_OPEN = 0,
  WIFI_AUTH_WEP = 1,
  WIFI_AUTH_WEP_PSK = 2,
  WIFI_AUTH_WEP2_PSK = 3,
  WIFI_AUTH_WPA_WPA2_PSK = 4,
  WIFI_AUTH_WPA2_ENTERPRISE = 5
}

export interface NetworkStatus {
  status: NetworkConnectionStatus;
  local_ip: string;
  local_ip_v6: string;
  mac_address: string;
  full_duplex: boolean;
  link_speed: number;
  link_up: number;
  network_id: number;
  subnet_mask: string;
  gateway_ip: string;
  dns_ip: string;
}

export interface NetworkSettings {
  password: string;
  hostname: string;
  static_ip_config: boolean;
  local_ip?: string;
  gateway_ip?: string;
  subnet_mask?: string;
  dns_ip?: string;
}

export interface NetworkList {
  networks: Network[];
}

export interface Network {
  rssi: number;
  ssid: string;
  bssid: string;
  channel: number;
  encryption_type: WiFiEncryptionType;
}
