import { Options, EngineHooks } from './build.js';
import { PluginConfig } from './config.js';
import { MaybePromise } from '@stryke/types/base';
import '@deepkit/type';
import '@storm-software/build-tools/types';
import '@storm-software/config/types';
import '@stryke/env/get-env-paths';
import '@stryke/env/types';
import '@stryke/types/configuration';
import '@stryke/types/package-json';
import '@stryke/types/tsconfig';
import 'hookable';
import 'jiti';
import 'magic-string';
import 'typescript';
import 'unimport';
import '@storm-software/config-tools/types';

interface IPlugin<TOptions extends Options = Options> {
    /**
     * The name of the plugin
     */
    name: string;
    /**
     * The path to install the plugin
     */
    installPath: string;
    /**
     * Function to add hooks to the engine
     */
    addHooks: (hooks: EngineHooks<TOptions>) => MaybePromise<void>;
}
interface IPreset<TOptions extends Options = Options> extends IPlugin<TOptions> {
    /**
     * A list of plugin modules required as dependencies by the current plugin.
     *
     * @remarks
     * These plugins will be called prior to the current plugin.
     */
    dependencies?: Array<string | PluginConfig>;
}

export type { IPlugin, IPreset };
