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

export const netgearLteDomain = "netgear_lte";
export const netgearLteDefaultName = "NETGEAR LTE";

export type TNetgearLteRawData = TSimpleLocalRawData;
export interface INetgearLteSnapshot extends ISimpleLocalSnapshot {}
export interface INetgearLteConfig extends ISimpleLocalConfig {
  url?: string;
  macAddress?: string;
  deviceId?: string;
}
export interface IHomeAssistantNetgearLteConfig extends INetgearLteConfig {}

export const netgearLteProfile: ISimpleLocalIntegrationProfile = {
  domain: netgearLteDomain,
  displayName: "NETGEAR LTE",
  manufacturer: "NETGEAR LTE",
  model: "NETGEAR LTE local integration",
  defaultName: netgearLteDefaultName,
  defaultPort: 80,
  defaultHttpPath: 'model.json',
  defaultProtocol: 'http',
  status: "control-runtime",
  platforms: [
    "binary_sensor",
    "sensor",
  ],
  serviceDomains: [],
  controlServices: [
    "connect_lte",
    "delete_sms",
    "disconnect_lte",
    "send_message",
    "set_option",
  ],
  discoverySources: [
    'manual',
    'custom',
  ],
  discoveryKeywords: [
    "netgear_lte",
    "NETGEAR LTE",
    "Netgear Lte",
    "NETGEAR",
    "LTE",
  ],
  metadata: {
    "source": "home-assistant/core",
    "upstreamPath": "homeassistant/components/netgear_lte",
    "upstreamDomain": "netgear_lte",
    "integrationType": "device",
    "iotClass": "local_polling",
    "requirements": [
      "eternalegypt==0.0.18",
    ],
    "codeowners": [
      "@tkdrob",
    ],
    "configFlow": true,
    "documentation": "https://www.home-assistant.io/integrations/netgear_lte",
    "loggers": [
      "eternalegypt",
    ],
    "runtime": {
      "type": "control-runtime",
      "services": [
        "snapshot",
        "status",
        "refresh",
        "connect_lte",
        "delete_sms",
        "disconnect_lte",
        "send_message",
        "set_option",
      ],
      "platforms": [
        "binary_sensor",
        "sensor",
      ],
      "controls": "native NETGEAR LTE HTTP forms when host/password are configured; injected executor fallback otherwise",
    },
    "localApi": {
      "implemented": [
        "live NETGEAR LTE model.json polling with session token login",
        "live NETGEAR LTE connect_lte, disconnect_lte, delete_sms, set_option, and SMS send form calls",
        "manual local setup for NETGEAR LTE endpoints, snapshots, rawData, snapshotProvider, and injected native clients",
        "runtime mapping for NETGEAR LTE device snapshots and Home Assistant platform metadata",
        "safe command delegation to injected client.execute or commandExecutor when no host is configured",
      ],
      "explicitUnsupported": [
        "NETGEAR LTE pairing, push subscriptions, APN editing, bridge mode, factory reset, or router restart flows",
        "Home Assistant entity registry migrations and repair flows",
        "claiming command success without a live authenticated modem response or injected command executor",
      ],
    },
  },
};
