import type { DiscoveryDescriptor } from './classes.discoverydescriptor.js';
import type { IIntegrationRuntime, IIntegrationSetupContext, TIntegrationStatus } from './types.js';

export abstract class BaseIntegration<TConfig = unknown> {
  public abstract readonly domain: string;
  public abstract readonly displayName: string;
  public abstract readonly status: TIntegrationStatus;
  public abstract readonly discoveryDescriptor: DiscoveryDescriptor;

  public abstract setup(
    configArg: TConfig,
    contextArg: IIntegrationSetupContext
  ): Promise<IIntegrationRuntime>;

  public abstract destroy(): Promise<void>;
}
