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

export const boschAlarmDomain = "bosch_alarm";
export const boschAlarmDefaultName = "Bosch Alarm";

export type TBoschAlarmRawData = TSimpleLocalRawData;
export interface IBoschAlarmSnapshot extends ISimpleLocalSnapshot {}
export interface IBoschAlarmConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantBoschAlarmConfig extends IBoschAlarmConfig {}

export const boschAlarmProfile: ISimpleLocalIntegrationProfile = {
  domain: "bosch_alarm",
  displayName: "Bosch Alarm",
  manufacturer: "Bosch",
  model: "Alarm panel",
  defaultName: "Bosch Alarm",
  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: [
    "bosch",
    "alarm",
    "mode2"
  ],
  metadata: {
    source: "home-assistant/core",
    upstreamPath: "homeassistant/components/bosch_alarm",
    upstreamDomain: "bosch_alarm",
    integrationType: "device",
    iotClass: "local_push",
    qualityScale: "platinum",
    requirements: [
      "bosch-alarm-mode2==0.4.10"
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      "@mag1024",
      "@sanjay900"
    ],
    configFlow: true,
    sample: {
      armed: false,
      alarm: false,
      zones: 12
    },
    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"
      ]
    }
  }
};
