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

export const airtouch4Domain = "airtouch4";
export const airtouch4DefaultName = "AirTouch 4";

export type TAirtouch4RawData = TSimpleLocalRawData;
export interface IAirtouch4Snapshot extends ISimpleLocalSnapshot {}
export interface IAirtouch4Config extends ISimpleLocalConfig {}
export interface IHomeAssistantAirtouch4Config extends IAirtouch4Config {}

export const airtouch4Profile: ISimpleLocalIntegrationProfile = {
  domain: "airtouch4",
  displayName: "AirTouch 4",
  manufacturer: "AirTouch",
  model: "AirTouch 4",
  defaultName: "AirTouch 4",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "climate",
    "fan",
    "sensor"
  ],
  serviceDomains: [
    "climate",
    "fan"
  ],
  controlServices: [
    "set_temperature",
    "set_hvac_mode",
    "set_percentage",
    "turn_on",
    "turn_off"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "airtouch",
    "airtouch4",
    "hvac"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/airtouch4",
    upstreamDomain: "airtouch4",
    integrationType: "device",
    iotClass: "local_polling",
    requirements: [
      "airtouch4pyapi==1.0.5"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "set_temperature",
        "set_hvac_mode",
        "set_percentage",
        "turn_on",
        "turn_off"
      ],
      platforms: [
        "climate",
        "fan",
        "sensor"
      ],
      controls: true
    },
    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"
      ]
    }
  }
};
