import { SimpleLocalIntegration } from '../../core/index.js';
import { EmoncmsConfigFlow } from './emoncms.classes.configflow.js';
import { createEmoncmsDiscoveryDescriptor } from './emoncms.discovery.js';
import type { IEmoncmsConfig } from './emoncms.types.js';
import { emoncmsDomain, emoncmsProfile } from './emoncms.types.js';

export class EmoncmsIntegration extends SimpleLocalIntegration<IEmoncmsConfig> {
  public readonly domain = emoncmsDomain;
  public readonly discoveryDescriptor = createEmoncmsDiscoveryDescriptor();
  public readonly configFlow = new EmoncmsConfigFlow();

  constructor() {
    super(emoncmsProfile);
  }
}

export class HomeAssistantEmoncmsIntegration extends EmoncmsIntegration {}
