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

export const idteckProxDomain = 'idteck_prox';
export const idteckProxDefaultName = 'IDTECK Proximity Reader';

export type TIdteckProxRawData = TSimpleLocalRawData;
export interface IIdteckProxSnapshot extends ISimpleLocalSnapshot {}
export interface IIdteckProxConfig extends ISimpleLocalConfig {
  readerName?: string;
}
export interface IHomeAssistantIdteckProxConfig extends IIdteckProxConfig {}

export const idteckProxProfile: ISimpleLocalIntegrationProfile = {
  domain: idteckProxDomain,
  displayName: 'IDTECK Proximity Reader',
  manufacturer: 'IDTECK',
  model: 'RFK101 proximity reader',
  defaultName: idteckProxDefaultName,
  defaultProtocol: 'tcp',
  status: 'read-only-runtime',
  platforms: [
    'sensor',
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    'manual',
    'custom',
  ],
  discoveryKeywords: [
    'idteck',
    'idteck prox',
    'proximity reader',
    'keycard',
    'rfk101',
  ],
  metadata: {
    source: 'home-assistant/core',
    upstreamPath: 'homeassistant/components/idteck_prox',
    upstreamDomain: 'idteck_prox',
    iotClass: 'local_push',
    qualityScale: 'legacy',
    requirements: [
      'rfk101py==0.0.1',
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: false,
    documentation: 'https://www.home-assistant.io/integrations/idteck_prox',
    loggers: [
      'rfk101py',
    ],
    homeAssistantPlatforms: [],
    runtime: {
      type: 'read-only-runtime',
      services: [
        'snapshot',
        'status',
        'refresh',
      ],
      platforms: [
        'sensor',
      ],
      controls: false,
    },
    localApi: {
      implemented: [
        'manual TCP reader setup from host, port, snapshots, rawData, snapshotProvider, and injected native clients',
        'runtime mapping for keycard event snapshots emitted by IDTECK proximity readers',
      ],
      explicitUnsupported: [
        'opening rfk101py reader sockets without an injected native client or snapshotProvider',
        'Home Assistant event bus emission; keycard reads are represented as snapshot entities',
        'claiming live command success without injected client.execute or commandExecutor',
      ],
    },
  },
};
