import type { ISimpleLocalConfig, ISimpleLocalIntegrationProfile, ISimpleLocalSnapshot, TSimpleLocalRawData } from '../../core/index.js';

export const airthingsBleDomain = "airthings_ble";
export const airthingsBleDefaultName = "Airthings BLE";

export type TAirthingsBleRawData = TSimpleLocalRawData;
export interface IAirthingsBleSnapshot extends ISimpleLocalSnapshot {}
export interface IAirthingsBleConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAirthingsBleConfig extends IAirthingsBleConfig {}

export const airthingsBleProfile: ISimpleLocalIntegrationProfile = {
  domain: "airthings_ble",
  displayName: "Airthings BLE",
  manufacturer: "Airthings",
  model: "BLE sensor",
  defaultName: "Airthings BLE",
  defaultProtocol: "local",
  status: "read-only-runtime",
  platforms: [
    "sensor",
    "binary_sensor"
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "airthings",
    "wave",
    "bluetooth"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/airthings_ble",
    upstreamDomain: "airthings_ble",
    integrationType: "device",
    iotClass: "local_polling",
    requirements: [
      "airthings-ble==1.2.0"
    ],
    dependencies: [
      "bluetooth_adapters"
    ],
    afterDependencies: [],
    codeowners: [],
    configFlow: true,
    runtime: {
      type: "read-only-runtime",
      services: [
        "snapshot",
        "status",
        "refresh"
      ],
      platforms: [
        "sensor",
        "binary_sensor"
      ],
      controls: false
    },
    localApi: {
      implemented: [
        "manual local endpoint setup",
        "snapshot, raw data, snapshotProvider, and injected native client operation",
        "generic HTTP/TCP local transport when config.path, config.transport, or documented defaults are supplied"
      ],
      explicitUnsupported: [
        "claiming live command success without injected client.execute or commandExecutor",
        "cloud account flows and remote API polling",
        "device-specific protocol features not represented by snapshot/rawData/client/executor inputs"
      ]
    }
  }
};
