import { SimpleLocalIntegration } from '../../core/index.js';
import { Fail2banConfigFlow } from './fail2ban.classes.configflow.js';
import { createFail2banDiscoveryDescriptor } from './fail2ban.discovery.js';
import type { IFail2banConfig } from './fail2ban.types.js';
import { fail2banDomain, fail2banProfile } from './fail2ban.types.js';

export class Fail2banIntegration extends SimpleLocalIntegration<IFail2banConfig> {
  public readonly domain = fail2banDomain;
  public readonly discoveryDescriptor = createFail2banDiscoveryDescriptor();
  public readonly configFlow = new Fail2banConfigFlow();

  constructor() {
    super(fail2banProfile);
  }
}

export class HomeAssistantFail2banIntegration extends Fail2banIntegration {}
