import Core from '../../core';
import { Events } from '../../core/hooks';

export class BasePlugin {
  readonly hot: Core;

  constructor(hotInstance: Core);

  static get PLUGIN_KEY(): string;
  static get SETTING_KEYS(): string[] | boolean;

  pluginName: string;
  pluginsInitializedCallbacks: string[];
  isPluginsReady: boolean;
  enabled: boolean;
  initialized: boolean;

  init(): void;
  enablePlugin(): void;
  disablePlugin(): void;
  updatePlugin(): void;
  addHook<K extends keyof Events>(key: K, callback: Events[K] | Array<Events[K]>, orderIndex?: number): void;
  removeHooks(name: keyof Events): void;
  clearHooks(): void;
  callOnPluginsReady(callback: () => void): void;
  destroy(): void;
}
