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

export const balboaDomain = "balboa";
export const balboaDefaultName = "Balboa Spa Client";

export type TBalboaRawData = TSimpleLocalRawData;
export interface IBalboaSnapshot extends ISimpleLocalSnapshot {}
export interface IBalboaConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantBalboaConfig extends IBalboaConfig {}

export const balboaProfile: ISimpleLocalIntegrationProfile = {
  domain: "balboa",
  displayName: "Balboa Spa Client",
  manufacturer: "Balboa",
  model: "Spa controller",
  defaultName: "Balboa Spa Client",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "climate",
    "switch",
    "sensor"
  ],
  serviceDomains: [
    "climate",
    "switch"
  ],
  controlServices: [
    "turn_on",
    "turn_off",
    "toggle",
    "set_temperature"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "balboa",
    "spa",
    "hot tub"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/balboa",
    upstreamDomain: "balboa",
    integrationType: "device",
    iotClass: "local_push",
    requirements: [
      "pybalboa==1.1.3"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@garbled1",
      "@natekspencer"
    ],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "turn_on",
        "turn_off",
        "toggle",
        "set_temperature"
      ],
      platforms: [
        "climate",
        "switch",
        "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"
      ]
    }
  }
};
