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

export const dovadoDomain = 'dovado';
export const dovadoDefaultName = 'Dovado Router';

export type TDovadoRawData = TSimpleLocalRawData;
export interface IDovadoSnapshot extends ISimpleLocalSnapshot {}
export interface IDovadoConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantDovadoConfig extends IDovadoConfig {}

export const dovadoProfile: ISimpleLocalIntegrationProfile = {
  domain: 'dovado',
  displayName: 'Dovado',
  manufacturer: 'Dovado',
  model: 'Router',
  defaultName: 'Dovado Router',
  defaultProtocol: 'local',
  status: 'control-runtime',
  platforms: [
    'sensor',
  ],
  serviceDomains: [
    'notify',
  ],
  controlServices: [
    'send_message',
    'send_sms',
  ],
  discoverySources: [
    'manual',
    'http',
    'custom',
  ],
  discoveryKeywords: [
    'dovado',
    'router',
    'modem status',
    'sms unread',
  ],
  metadata: {
    source: 'home-assistant/core',
    upstreamPath: 'homeassistant/components/dovado',
    upstreamDomain: 'dovado',
    iotClass: 'local_polling',
    qualityScale: 'legacy',
    requirements: [
      'dovado==0.4.1',
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: false,
    disabled: 'This integration is disabled because it uses non-open source code to operate.',
    runtime: {
      type: 'control-runtime',
      services: [
        'snapshot',
        'status',
        'refresh',
        'send_message',
        'send_sms',
      ],
      platforms: [
        'sensor',
      ],
      controls: true,
    },
    localApi: {
      implemented: [
        'manual local router setup',
        'snapshot, raw data, snapshotProvider, and injected native client operation',
        'generic HTTP local transport when config.path, config.transport, or documented defaults are supplied',
      ],
      explicitUnsupported: [
        'claiming live SMS notification success without injected client.execute or commandExecutor',
        'using the non-open-source Python dovado runtime directly',
        'device-specific protocol features not represented by snapshot/rawData/client/executor inputs',
      ],
    },
  },
};
