import { SimpleLocalIntegration, SimpleLocalRuntime, type IIntegrationRuntime, type IIntegrationSetupContext } from '../../core/index.js';
import { NetgearLteClient } from './netgear_lte.classes.client.js';
import { NetgearLteConfigFlow } from './netgear_lte.classes.configflow.js';
import { createNetgearLteDiscoveryDescriptor } from './netgear_lte.discovery.js';
import type { INetgearLteConfig } from './netgear_lte.types.js';
import { netgearLteDomain, netgearLteProfile } from './netgear_lte.types.js';

export class NetgearLteIntegration extends SimpleLocalIntegration<INetgearLteConfig> {
  public readonly domain = netgearLteDomain;
  public readonly discoveryDescriptor = createNetgearLteDiscoveryDescriptor();
  public readonly configFlow = new NetgearLteConfigFlow();

  constructor() {
    super(netgearLteProfile);
  }

  public override async setup(configArg: INetgearLteConfig, contextArg: IIntegrationSetupContext): Promise<IIntegrationRuntime> {
    void contextArg;
    return new SimpleLocalRuntime(netgearLteProfile, new NetgearLteClient(configArg));
  }
}

export class HomeAssistantNetgearLteIntegration extends NetgearLteIntegration {}
