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

export const kulerskyDomain = "kulersky";
export const kulerskyDefaultName = "Kuler Sky";

export type TKulerskyRawData = TSimpleLocalRawData;
export interface IKulerskySnapshot extends ISimpleLocalSnapshot {}
export interface IKulerskyConfig extends ISimpleLocalConfig {
  url?: string;
  macAddress?: string;
  deviceId?: string;
}

export const kulerskyProfile: ISimpleLocalIntegrationProfile = {
  domain: kulerskyDomain,
  displayName: "Kuler Sky",
  manufacturer: "Kuler Sky",
  model: "Kuler Sky local integration",
  defaultName: kulerskyDefaultName,
  defaultProtocol: 'local',
  status: "control-runtime",
  platforms: [
    "light",
  ],
  serviceDomains: [
    "light",
  ],
  controlServices: [
    "toggle",
    "turn_off",
    "turn_on",
  ],
  discoverySources: [
    'manual',
    'custom',
  ],
  discoveryKeywords: [
    "kulersky",
    "Kuler Sky",
    "Kulersky",
    "Kuler",
    "Sky",
  ],
  metadata: {
    "source": "home-assistant/core",
    "upstreamPath": "homeassistant/components/kulersky",
    "upstreamDomain": "kulersky",
    "integrationType": "device",
    "iotClass": "local_polling",
    "requirements": [
      "pykulersky==0.5.8",
    ],
    "dependencies": [
      "bluetooth_adapters",
    ],
    "codeowners": [
      "@emlove",
    ],
    "configFlow": true,
    "documentation": "https://www.home-assistant.io/integrations/kulersky",
    "loggers": [
      "bleak",
      "pykulersky",
    ],
    "runtime": {
      "type": "control-runtime",
      "services": [
        "snapshot",
        "status",
        "refresh",
        "toggle",
        "turn_off",
        "turn_on",
      ],
      "platforms": [
        "light",
      ],
      "controls": "delegated only to an injected BLE-capable client.execute or commandExecutor; no native BLE stack is bundled",
    },
    "localApi": {
      "status": "native live Kuler Sky is unsupported here because Home Assistant uses pykulersky over bleak/GATT Bluetooth and this package has no BLE transport dependency",
      "implemented": [
        "snapshot, rawData, snapshotProvider, and injected BLE-capable native client operation",
        "runtime mapping for Kuler Sky device snapshots and Home Assistant platform metadata",
        "safe command delegation to injected client.execute or commandExecutor only",
      ],
      "explicitUnsupported": [
        "native Kuler Sky BLE/GATT polling, pairing, get_color, or set_color because Home Assistant requires pykulersky/bleak and no BLE stack is available in existing dependencies",
        "claiming live Kuler Sky polling or write success without an injected BLE-capable native client or commandExecutor",
        "Home Assistant entity registry migrations and repair flows",
        "claiming command success without injected client.execute or commandExecutor",
      ],
    },
  },
};
