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

export const dremel3dPrinterDomain = 'dremel_3d_printer';
export const dremel3dPrinterDefaultName = 'Dremel 3D Printer';

export type TDremel3dPrinterRawData = TSimpleLocalRawData;
export interface IDremel3dPrinterSnapshot extends ISimpleLocalSnapshot {}
export interface IDremel3dPrinterConfig extends ISimpleLocalConfig {}
export interface IHomeAssistantDremel3dPrinterConfig extends IDremel3dPrinterConfig {}

export const dremel3dPrinterProfile: ISimpleLocalIntegrationProfile = {
  domain: 'dremel_3d_printer',
  displayName: 'Dremel 3D Printer',
  manufacturer: 'Dremel',
  model: '3D20/3D40/3D45',
  defaultName: 'Dremel 3D Printer',
  defaultProtocol: 'local',
  status: 'control-runtime',
  platforms: [
    'sensor',
    'binary_sensor',
    'button',
  ],
  serviceDomains: [
    'button',
  ],
  controlServices: [
    'press',
  ],
  discoverySources: [
    'manual',
    'http',
    'custom',
  ],
  discoveryKeywords: [
    'dremel',
    '3d20',
    '3d40',
    '3d45',
    'printer',
  ],
  metadata: {
    source: 'home-assistant/core',
    upstreamPath: 'homeassistant/components/dremel_3d_printer',
    upstreamDomain: 'dremel_3d_printer',
    integrationType: 'device',
    iotClass: 'local_polling',
    qualityScale: 'legacy',
    requirements: [
      'dremel3dpy==2.1.1',
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [
      '@tkdrob',
    ],
    configFlow: true,
    homeAssistantPlatforms: [
      'binary_sensor',
      'button',
      'camera',
      'sensor',
    ],
    runtime: {
      type: 'control-runtime',
      services: [
        'snapshot',
        'status',
        'refresh',
        'press',
      ],
      platforms: [
        'sensor',
        'binary_sensor',
        'button',
      ],
      controls: true,
    },
    localApi: {
      implemented: [
        'manual local endpoint setup',
        'snapshot, raw data, snapshotProvider, and injected native client operation',
        'Dremel button commands through injected client.execute or commandExecutor only',
      ],
      explicitUnsupported: [
        'claiming live Dremel pause, resume, or cancel success without injected client.execute or commandExecutor',
        'camera stream transport without a provided snapshot/client representation',
        'device-specific protocol features not represented by snapshot/rawData/client/executor inputs',
      ],
    },
  },
};
