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

export const victronGxDomain = "victron_gx";
export const victronGxDefaultName = "Victron GX";

export type TVictronGxRawData = TSimpleLocalRawData;
export interface IVictronGxSnapshot extends ISimpleLocalSnapshot {}
export interface IVictronGxConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantVictronGxConfig extends IVictronGxConfig {}

export const victronGxProfile: ISimpleLocalIntegrationProfile = {
  domain: "victron_gx",
  displayName: "Victron GX",
  manufacturer: "Victron Energy",
  model: "GX device",
  defaultName: "Victron GX",
  defaultPort: 1883,
  defaultProtocol: "mqtt",
  status: "read-only-runtime",
  platforms: [
    "sensor",
    "binary_sensor"
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "victron",
    "venus",
    "mqtt",
    "gx"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/victron_gx",
    upstreamDomain: "victron_gx",
    integrationType: "hub",
    iotClass: "local_push",
    qualityScale: "platinum",
    requirements: [
      "victron-mqtt==2026.4.17"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@tomer-w"
    ],
    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"
      ]
    }
  }
};
