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

export const familyhubDomain = 'familyhub';
export const familyhubDefaultName = 'FamilyHub Camera';

export type TFamilyhubRawData = TSimpleLocalRawData;
export interface IFamilyhubSnapshot extends ISimpleLocalSnapshot {}
export interface IFamilyhubConfig extends ISimpleLocalConfig {
  ipAddress?: string;
}
export interface IHomeAssistantFamilyhubConfig extends IFamilyhubConfig {}

export const familyhubProfile: ISimpleLocalIntegrationProfile = {
  domain: 'familyhub',
  displayName: 'Samsung Family Hub',
  manufacturer: 'Samsung',
  model: 'Family Hub refrigerator',
  defaultName: familyhubDefaultName,
  defaultPort: 17654,
  defaultHttpPath: '/.krate/owner/share/scloud/glazeCameraInfo.txt',
  defaultProtocol: 'http',
  status: 'read-only-runtime',
  platforms: [
    'sensor',
  ],
  serviceDomains: [
    'camera',
  ],
  controlServices: [],
  discoverySources: [
    'manual',
    'http',
    'custom',
  ],
  discoveryKeywords: [
    'familyhub',
    'family hub',
    'samsung',
    'fridge',
    'refrigerator',
    'glazeCameraInfo',
  ],
  metadata: {
    source: 'home-assistant/core',
    upstreamPath: 'homeassistant/components/familyhub',
    upstreamDomain: 'familyhub',
    iotClass: 'local_polling',
    qualityScale: 'legacy',
    requirements: [
      'python-family-hub-local==0.0.2',
    ],
    dependencies: [],
    afterDependencies: [],
    codeowners: [],
    configFlow: false,
    loggers: [
      'pyfamilyhublocal',
    ],
    homeAssistantPlatforms: [
      'camera',
    ],
    runtime: {
      type: 'read-only-runtime',
      services: [
        'snapshot',
        'status',
        'refresh',
      ],
      platforms: [
        'sensor',
      ],
      controls: false,
    },
    localApi: {
      implemented: [
        'manual local HTTP camera-info setup on port 17654',
        'snapshot, raw data, snapshotProvider, and injected native client operation',
      ],
      explicitUnsupported: [
        'claiming live command success without injected client.execute or commandExecutor',
        'composing or writing camera images without a provided snapshot or client representation',
        'cloud account flows and remote API polling',
      ],
    },
  },
};
