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

export const tplinkLteDomain = "tplink_lte";
export const tplinkLteDefaultName = "TP-Link LTE";

export type TTplinkLteRawData = TSimpleLocalRawData;
export interface ITplinkLteSnapshot extends ISimpleLocalSnapshot {}
export interface ITplinkLteConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantTplinkLteConfig extends ITplinkLteConfig {}

export const tplinkLteProfile: ISimpleLocalIntegrationProfile = {
  domain: "tplink_lte",
  displayName: "TP-Link LTE",
  manufacturer: "TP-Link",
  model: "LTE router",
  defaultName: "TP-Link LTE",
  defaultPort: 80,
  defaultProtocol: "http",
  status: "control-runtime",
  platforms: [
    "sensor",
    "switch"
  ],
  serviceDomains: [
    "switch"
  ],
  controlServices: [
    "turn_on",
    "turn_off",
    "toggle"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "tp-link",
    "tplink",
    "lte",
    "router"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/tplink_lte",
    upstreamDomain: "tplink_lte",
    iotClass: "local_polling",
    qualityScale: "legacy",
    requirements: [],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "turn_on",
        "turn_off",
        "toggle"
      ],
      platforms: [
        "sensor",
        "switch"
      ],
      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"
      ]
    }
  }
};
