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

export const alarmdecoderDomain = "alarmdecoder";
export const alarmdecoderDefaultName = "AlarmDecoder";

export type TAlarmdecoderRawData = TSimpleLocalRawData;
export interface IAlarmdecoderSnapshot extends ISimpleLocalSnapshot {}
export interface IAlarmdecoderConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantAlarmdecoderConfig extends IAlarmdecoderConfig {}

export const alarmdecoderProfile: ISimpleLocalIntegrationProfile = {
  domain: "alarmdecoder",
  displayName: "AlarmDecoder",
  manufacturer: "AlarmDecoder",
  model: "Alarm panel bridge",
  defaultName: "AlarmDecoder",
  defaultProtocol: "local",
  status: "control-runtime",
  platforms: [
    "binary_sensor",
    "sensor"
  ],
  serviceDomains: [
    "alarm_control_panel"
  ],
  controlServices: [
    "arm_away",
    "arm_home",
    "disarm"
  ],
  discoverySources: [
    "manual",
    "mdns",
    "ssdp",
    "http",
    "custom"
  ],
  discoveryKeywords: [
    "alarmdecoder",
    "alarm panel"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/alarmdecoder",
    upstreamDomain: "alarmdecoder",
    integrationType: "device",
    iotClass: "local_push",
    requirements: [
      "adext==0.4.4"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: true,
    runtime: {
      type: "control-runtime",
      services: [
        "snapshot",
        "status",
        "refresh",
        "arm_away",
        "arm_home",
        "disarm"
      ],
      platforms: [
        "binary_sensor",
        "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"
      ]
    }
  }
};
