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

export const upcConnectDomain = "upc_connect";
export const upcConnectDefaultName = "UPC Connect Box";

export type TUpcConnectRawData = TSimpleLocalRawData;
export interface IUpcConnectSnapshot extends ISimpleLocalSnapshot {}
export interface IUpcConnectConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantUpcConnectConfig extends IUpcConnectConfig {}

export const upcConnectProfile: ISimpleLocalIntegrationProfile = {
  domain: "upc_connect",
  displayName: "UPC Connect Box",
  manufacturer: "UPC",
  model: "Connect Box",
  defaultName: "UPC Connect Box",
  defaultPort: 80,
  defaultProtocol: "http",
  status: "read-only-runtime",
  platforms: [
    "sensor",
    "binary_sensor"
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "upc",
    "connect box",
    "router"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/upc_connect",
    upstreamDomain: "upc_connect",
    iotClass: "local_polling",
    qualityScale: "legacy",
    requirements: [
      "connect-box==0.3.1"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@pvizeli",
      "@fabaff"
    ],
    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"
      ]
    }
  }
};
