import { type Logger } from '../utility/logging/logger.ts';
import { EventEmitter } from 'node:events';
import { databaseEventsEmitter } from '../resources/databases.ts';
import { type Server } from '../server/Server.ts';
import { EntryHandler, type onEntryEventHandler } from './EntryHandler.ts';
import { OptionsWatcher } from './OptionsWatcher.ts';
import { type Resources } from '../resources/Resources.ts';
import type { FileAndURLPathConfig } from './Component.ts';
import { FilesOption } from './deriveGlobOptions.ts';
import { ApplicationScope } from './ApplicationScope.ts';
export declare class MissingDefaultFilesOptionError extends Error {
    constructor();
}
export type ScopeEventsMap = {
    all: [...args: unknown[]];
    close: [];
    error: [error: unknown];
    ready: [];
    [record: string]: [...args: unknown[]];
};
/**
 * This class is what is passed to the `handleApplication` function of an extension.
 *
 * It is imperative that the instance is "ready" before it's passed to the `handleApplication` function
 * so that the developer can immediately start using `scope.options`, etc.
 *
 */
export declare class Scope extends EventEmitter<ScopeEventsMap> {
    #private;
    applicationScope?: ApplicationScope;
    options: OptionsWatcher;
    resources?: Resources;
    server?: Server;
    ready: Promise<any[]>;
    databaseEvents: typeof databaseEventsEmitter;
    constructor(appName: string, pluginName: string, directory: string, configFilePath: string, applicationScope: ApplicationScope);
    get logger(): Logger;
    get appName(): string;
    get pluginName(): string;
    get directory(): string;
    get configFilePath(): string;
    close(): this;
    handleEntry(files: FilesOption | FileAndURLPathConfig, handler: onEntryEventHandler): EntryHandler;
    handleEntry(handler: onEntryEventHandler): EntryHandler;
    handleEntry(): EntryHandler;
    requestRestart(): void;
    /**
     * Wait for all entry handlers' initial loads to complete.
     * This includes waiting for any async operations in entry handler callbacks.
     * Called by the component loader after handleApplication completes.
     */
    waitForInitialLoads(): Promise<void>;
    /**
     * Import a file into the scope's sandbox.
     * @param filePath - The path of the file to import.
     * @returns A promise that resolves with the imported module or value.
     */
    import(filePath: string): Promise<unknown>;
}
