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

export const casperGlowDomain = "casper_glow";
export const casperGlowDefaultName = "Casper Glow";

export type TCasperGlowRawData = TSimpleLocalRawData;
export interface ICasperGlowSnapshot extends ISimpleLocalSnapshot {}
export interface ICasperGlowConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantCasperGlowConfig extends ICasperGlowConfig {}

export const casperGlowProfile: ISimpleLocalIntegrationProfile = {
  domain: "casper_glow",
  displayName: "Casper Glow",
  manufacturer: "Casper",
  model: "Glow light",
  defaultName: "Casper Glow",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "light",
    "sensor"
  ],
  serviceDomains: [
    "light"
  ],
  controlServices: [
    "turn_on",
    "turn_off",
    "toggle",
    "set_level"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "casper",
    "glow",
    "light"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/casper_glow",
    upstreamDomain: "casper_glow",
    integrationType: "device",
    iotClass: "local_polling",
    qualityScale: "platinum",
    requirements: [
      "pycasperglow==1.2.0"
    ],
    dependencies: [
      "bluetooth_adapters"
    ],
    afterDependencies: [],
    codeowners: [
      "@mikeodr"
    ],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "turn_on",
        "turn_off",
        "toggle",
        "set_level"
      ],
      platforms: [
        "light",
        "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"
      ]
    }
  }
};
