"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.initSharedAPIProxy = initSharedAPIProxy;
const extension_log_1 = require("../../../common/extension-log");
const vscode_1 = require("../../../common/vscode");
const main_thread_api_progress_1 = require("./main.thread.api.progress");
const main_thread_api_webview_1 = require("./main.thread.api.webview");
const main_thread_authentication_1 = require("./main.thread.authentication");
const main_thread_commands_1 = require("./main.thread.commands");
const main_thread_comments_1 = require("./main.thread.comments");
const main_thread_custom_editor_1 = require("./main.thread.custom-editor");
const main_thread_decoration_1 = require("./main.thread.decoration");
const main_thread_doc_1 = require("./main.thread.doc");
const main_thread_editor_1 = require("./main.thread.editor");
const main_thread_editor_tabs_1 = require("./main.thread.editor-tabs");
const main_thread_env_1 = require("./main.thread.env");
const main_thread_file_system_1 = require("./main.thread.file-system");
const main_thread_file_system_event_1 = require("./main.thread.file-system-event");
const main_thread_language_1 = require("./main.thread.language");
const main_thread_localization_1 = require("./main.thread.localization");
const main_thread_log_1 = require("./main.thread.log");
const main_thread_message_1 = require("./main.thread.message");
const main_thread_notebook_1 = require("./main.thread.notebook");
const main_thread_output_1 = require("./main.thread.output");
const main_thread_preference_1 = require("./main.thread.preference");
const main_thread_quickopen_1 = require("./main.thread.quickopen");
const main_thread_scm_1 = require("./main.thread.scm");
const main_thread_secret_1 = require("./main.thread.secret");
const main_thread_statusbar_1 = require("./main.thread.statusbar");
const main_thread_storage_1 = require("./main.thread.storage");
const main_thread_theming_1 = require("./main.thread.theming");
const main_thread_urls_1 = require("./main.thread.urls");
const main_thread_workspace_1 = require("./main.thread.workspace");
function initSharedAPIProxy(rpcProtocol, injector) {
    const MainThreadLanguagesAPI = injector.get(main_thread_language_1.MainThreadLanguages, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadLanguages, MainThreadLanguagesAPI);
    const MainThreadCommandsAPI = injector.get(main_thread_commands_1.MainThreadCommands, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadCommands, MainThreadCommandsAPI);
    const MainThreadExtensionDocumentDataAPI = injector.get(main_thread_doc_1.MainThreadExtensionDocumentData, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadDocuments, MainThreadExtensionDocumentDataAPI);
    const MainThreadEditorServiceAPI = injector.get(main_thread_editor_1.MainThreadEditorService, [
        rpcProtocol,
        MainThreadExtensionDocumentDataAPI,
    ]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadEditors, MainThreadEditorServiceAPI);
    const MainThreadNotebookDocumentAPI = injector.get(main_thread_notebook_1.MainThreadExtensionNotebook, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadNotebook, MainThreadNotebookDocumentAPI);
    const MainThreadStatusBarAPI = injector.get(main_thread_statusbar_1.MainThreadStatusBar, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadStatusBar, MainThreadStatusBarAPI);
    const MainThreadMessageAPI = injector.get(main_thread_message_1.MainThreadMessage, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadMessages, MainThreadMessageAPI);
    const MainThreadStorageAPI = injector.get(main_thread_storage_1.MainThreadStorage, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadStorage, MainThreadStorageAPI);
    const MainThreadWorkspaceAPI = injector.get(main_thread_workspace_1.MainThreadWorkspace, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadWorkspace, MainThreadWorkspaceAPI);
    const MainThreadQuickOpenAPI = injector.get(main_thread_quickopen_1.MainThreadQuickOpen, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadQuickOpen, MainThreadQuickOpenAPI);
    const MainThreadPreferenceAPI = injector.get(main_thread_preference_1.MainThreadPreference, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadPreference, MainThreadPreferenceAPI);
    const MainThreadEnvAPI = injector.get(main_thread_env_1.MainThreadEnv, [rpcProtocol, MainThreadStorageAPI]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadEnv, MainThreadEnvAPI);
    const MainThreadExtensionLogAPI = injector.get(main_thread_log_1.MainThreadExtensionLog);
    rpcProtocol.set(extension_log_1.MainThreadExtensionLogIdentifier, MainThreadExtensionLogAPI);
    const MainThreadProgressAPI = injector.get(main_thread_api_progress_1.MainThreadProgress, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadProgress, MainThreadProgressAPI);
    const MainThreadOutputAPI = injector.get(main_thread_output_1.MainThreadOutput);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadOutput, MainThreadOutputAPI);
    const MainThreadFileSystemAPI = injector.get(main_thread_file_system_1.MainThreadFileSystem, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadFileSystem, MainThreadFileSystemAPI);
    const MainThreadFileSystemEventAPI = injector.get(main_thread_file_system_event_1.MainThreadFileSystemEvent, [rpcProtocol]);
    const MainThreadWebviewAPI = injector.get(main_thread_api_webview_1.MainThreadWebview, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadWebview, MainThreadWebviewAPI);
    const MainThreadWebviewViewAPI = injector.get(main_thread_api_webview_1.MainThreadWebviewView, [rpcProtocol, MainThreadWebviewAPI]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadWebviewView, MainThreadWebviewViewAPI);
    const MainThreadUrlsAPI = injector.get(main_thread_urls_1.MainThreadUrls, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadUrls, MainThreadUrlsAPI);
    const MainThreadCommentsAPI = injector.get(main_thread_comments_1.MainThreadComments, [rpcProtocol, MainThreadCommandsAPI]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadComments, MainThreadCommentsAPI);
    const MainThreadAuthenticationAPI = injector.get(main_thread_authentication_1.MainThreadAuthentication, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadAuthentication, MainThreadAuthenticationAPI);
    const MainThreadLocalizationAPI = injector.get(main_thread_localization_1.MainThreadLocalization, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadLocalization, MainThreadLocalizationAPI);
    const MainThreadEditorTabsAPI = injector.get(main_thread_editor_tabs_1.MainThreadEditorTabsService, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadEditorTabs, MainThreadEditorTabsAPI);
    const MainThreadSCMAPI = injector.get(main_thread_scm_1.MainThreadSCM, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadSCM, MainThreadSCMAPI);
    const MainThreadSecretAPI = injector.get(main_thread_secret_1.MainThreadSecret, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadSecret, MainThreadSecretAPI);
    const MainThreadDecorationsAPI = injector.get(main_thread_decoration_1.MainThreadDecorations, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadDecorations, MainThreadDecorationsAPI);
    const MainThreadThemingAPI = injector.get(main_thread_theming_1.MainThreadTheming, [rpcProtocol]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadTheming, MainThreadThemingAPI);
    const MainThreadCustomEditorAPI = injector.get(main_thread_custom_editor_1.MainThreadCustomEditor, [rpcProtocol, MainThreadWebviewAPI]);
    rpcProtocol.set(vscode_1.MainThreadAPIIdentifier.MainThreadCustomEditor, MainThreadCustomEditorAPI);
    return {
        setup: async () => {
            await MainThreadWebviewAPI.init();
        },
        dispose: () => {
            MainThreadLanguagesAPI.dispose();
            MainThreadCommandsAPI.dispose();
            MainThreadStatusBarAPI.dispose();
            MainThreadExtensionDocumentDataAPI.dispose();
            MainThreadNotebookDocumentAPI.dispose();
            MainThreadEditorServiceAPI.dispose();
            MainThreadMessageAPI.dispose();
            MainThreadStorageAPI.dispose();
            MainThreadWorkspaceAPI.dispose();
            MainThreadQuickOpenAPI.dispose();
            MainThreadPreferenceAPI.dispose();
            MainThreadEnvAPI.dispose();
            MainThreadProgressAPI.dispose();
            MainThreadOutputAPI.dispose();
            MainThreadFileSystemAPI.dispose();
            MainThreadFileSystemEventAPI.dispose();
            MainThreadWebviewAPI.dispose();
            MainThreadWebviewViewAPI.dispose();
            MainThreadUrlsAPI.dispose();
            MainThreadAuthenticationAPI.dispose();
            MainThreadCommentsAPI.dispose();
            MainThreadEditorTabsAPI.dispose();
            MainThreadSCMAPI.dispose();
            MainThreadSecretAPI.dispose();
            MainThreadDecorationsAPI.dispose();
            MainThreadThemingAPI.dispose();
            MainThreadCustomEditorAPI.dispose();
        },
    };
}
//# sourceMappingURL=main.thread.api.shared-impl.js.map