"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExtensionModule = void 0;
const tslib_1 = require("tslib");
const di_1 = require("@opensumi/di");
const ide_core_browser_1 = require("@opensumi/ide-core-browser");
const debug_session_contribution_1 = require("@opensumi/ide-debug/lib/browser/debug-session-contribution");
const common_1 = require("@opensumi/ide-debug/lib/common");
const common_2 = require("@opensumi/ide-file-search/lib/common");
const common_3 = require("../common");
const extension_service_1 = require("../common/extension.service");
const main_thread_extender_1 = require("../common/main.thread.extender");
const activation_service_1 = require("./activation.service");
const extension_command_management_1 = require("./extension-command-management");
const extension_instance_management_1 = require("./extension-instance-management");
const extension_management_service_1 = require("./extension-management.service");
const extension_node_service_1 = require("./extension-node.service");
const extension_view_service_1 = require("./extension-view.service");
const extension_worker_service_1 = require("./extension-worker.service");
const extension_contribution_1 = require("./extension.contribution");
const extension_service_2 = require("./extension.service");
const require_interceptor_contribution_1 = require("./require-interceptor.contribution");
const contributes_1 = require("./sumi/contributes");
const types_1 = require("./types");
const debug_1 = require("./vscode/api/debug");
const contributes_2 = require("./vscode/contributes");
let ExtensionModule = class ExtensionModule extends ide_core_browser_1.BrowserModule {
    constructor() {
        super(...arguments);
        this.contributionProvider = [common_3.RequireInterceptorContribution, main_thread_extender_1.MainThreadExtenderContribution];
        this.providers = [
            {
                token: common_3.ExtensionService,
                useClass: extension_service_2.ExtensionServiceImpl,
            },
            {
                token: common_1.IDebugServer,
                useClass: debug_1.ExtensionDebugService,
                override: true,
            },
            {
                token: debug_session_contribution_1.DebugSessionContributionRegistry,
                useClass: debug_1.ExtensionDebugSessionContributionRegistry,
                override: true,
            },
            {
                token: types_1.IActivationEventService,
                useClass: activation_service_1.ActivationEventServiceImpl,
            },
            {
                token: common_3.IExtCommandManagement,
                useClass: extension_command_management_1.ExtCommandManagementImpl,
            },
            {
                token: types_1.AbstractExtInstanceManagementService,
                useClass: extension_instance_management_1.ExtInstanceManagementService,
            },
            {
                token: common_3.AbstractExtensionManagementService,
                useClass: extension_management_service_1.ExtensionManagementService,
            },
            {
                token: extension_service_1.AbstractNodeExtProcessService,
                useClass: extension_node_service_1.NodeExtProcessService,
            },
            {
                token: extension_service_1.AbstractWorkerExtProcessService,
                useClass: extension_worker_service_1.WorkerExtProcessService,
            },
            {
                token: extension_service_1.AbstractViewExtProcessService,
                useClass: extension_view_service_1.ViewExtProcessService,
            },
            {
                token: common_3.IRequireInterceptorService,
                useClass: common_3.RequireInterceptorService,
            },
            {
                token: contributes_2.VSCodeContributesServiceToken,
                useClass: contributes_2.VSCodeContributesService,
            },
            {
                token: contributes_1.SumiContributionsServiceToken,
                useClass: contributes_1.SumiContributionsService,
            },
            {
                token: main_thread_extender_1.IMainThreadExtenderService,
                useClass: main_thread_extender_1.MainThreadExtenderService,
            },
            extension_contribution_1.ExtensionCommandContribution,
            extension_contribution_1.ExtensionClientAppContribution,
            require_interceptor_contribution_1.BrowserRequireInterceptorContribution,
        ];
        this.backServices = [
            {
                servicePath: common_3.ExtensionNodeServiceServerPath,
                clientToken: common_3.ExtensionService,
            },
            {
                servicePath: common_2.FileSearchServicePath,
            },
            {
                servicePath: common_3.ExtensionHostProfilerServicePath,
            },
        ];
    }
};
exports.ExtensionModule = ExtensionModule;
exports.ExtensionModule = ExtensionModule = tslib_1.__decorate([
    (0, di_1.Injectable)()
], ExtensionModule);
//# sourceMappingURL=index.js.map