import { SimpleLocalIntegration } from '../../core/index.js';
import { UbusConfigFlow } from './ubus.classes.configflow.js';
import { createUbusDiscoveryDescriptor } from './ubus.discovery.js';
import type { IUbusConfig } from './ubus.types.js';
import { ubusDomain, ubusProfile } from './ubus.types.js';

export class UbusIntegration extends SimpleLocalIntegration<IUbusConfig> {
  public readonly domain = ubusDomain;
  public readonly discoveryDescriptor = createUbusDiscoveryDescriptor();
  public readonly configFlow = new UbusConfigFlow();

  constructor() {
    super(ubusProfile);
  }
}

export class HomeAssistantUbusIntegration extends UbusIntegration {}
