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

export const apacheKafkaDomain = "apache_kafka";
export const apacheKafkaDefaultName = "Apache Kafka";

export type TApacheKafkaRawData = TSimpleLocalRawData;
export interface IApacheKafkaSnapshot extends ISimpleLocalSnapshot {}
export interface IApacheKafkaConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantApacheKafkaConfig extends IApacheKafkaConfig {}

export const apacheKafkaProfile: ISimpleLocalIntegrationProfile = {
  domain: "apache_kafka",
  displayName: "Apache Kafka",
  manufacturer: "Apache",
  model: "Kafka broker",
  defaultName: "Apache Kafka",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "sensor",
    "binary_sensor"
  ],
  serviceDomains: [
    "apache_kafka"
  ],
  controlServices: [
    "publish",
    "send_message"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "kafka",
    "broker",
    "topic"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/apache_kafka",
    upstreamDomain: "apache_kafka",
    integrationType: "service",
    iotClass: "local_push",
    qualityScale: "legacy",
    requirements: [
      "aiokafka==0.10.0"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@bachya"
    ],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "publish",
        "send_message"
      ],
      platforms: [
        "sensor",
        "binary_sensor"
      ],
      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"
      ]
    }
  }
};
