import { IExtensionsService, IExecutableExtension, IConfiguredExtension, IPlatformContext } from '@adminide-stack/extension-api';
import { Subscribable } from 'rxjs';
import { ModelService } from './model-service';
export declare class HTTPStatusError extends Error {
    readonly name = "HTTPStatusError";
    readonly status: number;
    constructor(response: Response);
}
/**
 * Checks if a given fetch Response has a HTTP 2xx status code and throws an HTTPStatusError otherwise.
 */
export declare function checkOk(response: Response): Response;
/**
 * Manages the set of extensions that are available and activated.
 *
 * @internal This is an internal implementation detail and is different from the product feature called the
 * "extension registry" (where users can search for and enable extensions).
 */
export declare class ExtensionsService implements IExtensionsService {
    private platformContext;
    private modelService;
    private extensionActivationFilter;
    private fetchSideloadedExtension;
    constructor(platformContext: IPlatformContext, modelService: Pick<ModelService, 'activeLanguages'>, extensionActivationFilter?: typeof extensionsWithMatchedActivationEvent, fetchSideloadedExtension?: (baseUrl: string) => Subscribable<IConfiguredExtension | null>);
    protected configuredExtensions: Subscribable<IConfiguredExtension[]>;
    /**
     * Returns an observable that emits the set of enabled extensions upon subscription and whenever it changes.
     *
     * Most callers should use {@link ExtensionsService#activeExtensions}.
     */
    private get enabledExtensions();
    private get sideloadedExtension();
    /**
     * Returns an observable that emits the set of extensions that should be active, based on the previous and
     * current state and each available extenion's activationEvents.
     *
     * An extension is activated when one or more of its activationEvents is true. After an extension has been
     * activated, it remains active for the rest of the sesion (i.e., for as long as the browser tab remains open)
     * as long as it remains enabled. If it is disabled, it is deactivated. (i.e., "activationEvents" are
     * retrospective/sticky.)
     *
     * @todo Consider whether extensions should be deactivated if none of their activationEvents are true (or that
     * plus a certain period of inactivity).
     */
    get activeExtensions(): Subscribable<IExecutableExtension[]>;
    private memoizedGetScriptURLForExtension;
}
declare function extensionsWithMatchedActivationEvent(enabledExtensions: IConfiguredExtension[], visibleTextDocumentLanguages: ReadonlySet<string>): IConfiguredExtension[];
export {};
