import { SimpleLocalIntegration, SimpleLocalRuntime, type IIntegrationRuntime, type IIntegrationSetupContext } from '../../core/index.js';
import { HisenseAehw4a1Client } from './hisense_aehw4a1.classes.client.js';
import { HisenseAehw4a1ConfigFlow } from './hisense_aehw4a1.classes.configflow.js';
import { createHisenseAehw4a1DiscoveryDescriptor } from './hisense_aehw4a1.discovery.js';
import type { IHisenseAehw4a1Config } from './hisense_aehw4a1.types.js';
import { hisenseAehw4a1Domain, hisenseAehw4a1Profile } from './hisense_aehw4a1.types.js';

export class HisenseAehw4a1Integration extends SimpleLocalIntegration<IHisenseAehw4a1Config> {
  public readonly domain = hisenseAehw4a1Domain;
  public readonly discoveryDescriptor = createHisenseAehw4a1DiscoveryDescriptor();
  public readonly configFlow = new HisenseAehw4a1ConfigFlow();

  constructor() {
    super(hisenseAehw4a1Profile);
  }

  public async setup(configArg: IHisenseAehw4a1Config, contextArg: IIntegrationSetupContext): Promise<IIntegrationRuntime> {
    void contextArg;
    return new SimpleLocalRuntime(hisenseAehw4a1Profile, new HisenseAehw4a1Client(configArg));
  }
}

export class HomeAssistantHisenseAehw4a1Integration extends HisenseAehw4a1Integration {}
