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

export const dropletDomain = 'droplet';
export const dropletDefaultName = 'Droplet';

export type TDropletRawData = TSimpleLocalRawData;
export interface IDropletSnapshot extends ISimpleLocalSnapshot {}
export interface IDropletConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantDropletConfig extends IDropletConfig {}

export const dropletProfile: ISimpleLocalIntegrationProfile = {
  domain: 'droplet',
  displayName: 'Droplet',
  defaultName: 'Droplet',
  defaultProtocol: 'local',
  status: 'read-only-runtime',
  platforms: [
    'sensor',
  ],
  serviceDomains: [],
  controlServices: [],
  discoverySources: [
    'manual',
    'mdns',
    'custom',
  ],
  discoveryKeywords: [
    'droplet',
    '_droplet._tcp.local',
    'water',
    'pydroplet',
  ],
  metadata: {
    source: 'home-assistant/core',
    upstreamPath: 'homeassistant/components/droplet',
    upstreamDomain: 'droplet',
    integrationType: 'device',
    iotClass: 'local_push',
    qualityScale: 'bronze',
    requirements: [
      'pydroplet==2.3.4',
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      '@sarahseidman',
    ],
    configFlow: true,
    zeroconf: [
      '_droplet._tcp.local.',
    ],
    homeAssistantPlatforms: [
      'sensor',
    ],
    runtime: {
      type: 'read-only-runtime',
      services: [
        'snapshot',
        'status',
        'refresh',
      ],
      platforms: [
        'sensor',
      ],
      controls: false,
    },
    localApi: {
      implemented: [
        'manual local endpoint setup',
        'snapshot, raw data, snapshotProvider, and injected native client operation',
      ],
      explicitUnsupported: [
        'claiming live Droplet pairing or listener success without injected client data',
        'live device control services; Home Assistant exposes Droplet sensors only',
        'device-specific protocol features not represented by snapshot/rawData/client inputs',
      ],
    },
  },
};
