"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("../../src/browser/style/index.css");
var inversify_1 = require("inversify");
var widget_manager_1 = require("@theia/core/lib/browser/widget-manager");
var command_1 = require("@theia/core/lib/common/command");
var view_contribution_1 = require("@theia/core/lib/browser/shell/view-contribution");
var tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
var ws_connection_provider_1 = require("@theia/core/lib/browser/messaging/ws-connection-provider");
var frontend_application_1 = require("@theia/core/lib/browser/frontend-application");
var library_list_widget_1 = require("./library/library-list-widget");
var arduino_frontend_contribution_1 = require("./arduino-frontend-contribution");
var library_service_1 = require("../common/protocol/library-service");
var boards_service_1 = require("../common/protocol/boards-service");
var sketches_service_1 = require("../common/protocol/sketches-service");
var sketches_service_client_impl_1 = require("../common/protocol/sketches-service-client-impl");
var core_service_1 = require("../common/protocol/core-service");
var boards_list_widget_1 = require("./boards/boards-list-widget");
var boards_widget_frontend_contribution_1 = require("./boards/boards-widget-frontend-contribution");
var boards_service_provider_1 = require("./boards/boards-service-provider");
var workspace_service_1 = require("@theia/workspace/lib/browser/workspace-service");
var workspace_service_2 = require("./theia/workspace/workspace-service");
var outline_view_contribution_1 = require("@theia/outline-view/lib/browser/outline-view-contribution");
var outline_contribution_1 = require("./theia/outline/outline-contribution");
var problem_contribution_1 = require("@theia/markers/lib/browser/problem/problem-contribution");
var problem_contribution_2 = require("./theia/markers/problem-contribution");
var navigator_contribution_1 = require("./theia/navigator/navigator-contribution");
var navigator_contribution_2 = require("@theia/navigator/lib/browser/navigator-contribution");
var arduino_toolbar_contribution_1 = require("./toolbar/arduino-toolbar-contribution");
var editor_contribution_1 = require("@theia/editor/lib/browser/editor-contribution");
var editor_contribution_2 = require("./theia/editor/editor-contribution");
var monaco_status_bar_contribution_1 = require("@theia/monaco/lib/browser/monaco-status-bar-contribution");
var monaco_status_bar_contribution_2 = require("./theia/monaco/monaco-status-bar-contribution");
var browser_1 = require("@theia/core/lib/browser");
var menu_1 = require("@theia/core/lib/common/menu");
var application_shell_1 = require("./theia/core/application-shell");
var frontend_application_2 = require("./theia/core/frontend-application");
var boards_config_dialog_1 = require("./boards/boards-config-dialog");
var boards_config_dialog_widget_1 = require("./boards/boards-config-dialog-widget");
var scm_contribution_1 = require("@theia/scm/lib/browser/scm-contribution");
var scm_contribution_2 = require("./theia/scm/scm-contribution");
var search_in_workspace_frontend_contribution_1 = require("@theia/search-in-workspace/lib/browser/search-in-workspace-frontend-contribution");
var search_in_workspace_frontend_contribution_2 = require("./theia/search-in-workspace/search-in-workspace-frontend-contribution");
var library_widget_frontend_contribution_1 = require("./library/library-widget-frontend-contribution");
var monitor_service_client_impl_1 = require("./monitor/monitor-service-client-impl");
var monitor_service_1 = require("../common/protocol/monitor-service");
var config_service_1 = require("../common/protocol/config-service");
var monitor_widget_1 = require("./monitor/monitor-widget");
var monitor_view_contribution_1 = require("./monitor/monitor-view-contribution");
var monitor_connection_1 = require("./monitor/monitor-connection");
var monitor_model_1 = require("./monitor/monitor-model");
var tab_bar_decorator_1 = require("@theia/core/lib/browser/shell/tab-bar-decorator");
var tab_bar_decorator_2 = require("./theia/core/tab-bar-decorator");
var browser_2 = require("@theia/markers/lib/browser");
var problem_manager_1 = require("./theia/markers/problem-manager");
var boards_auto_installer_1 = require("./boards/boards-auto-installer");
var shell_layout_restorer_1 = require("./theia/core/shell-layout-restorer");
var editor_mode_1 = require("./editor-mode");
var list_item_renderer_1 = require("./widgets/component-list/list-item-renderer");
var color_application_contribution_1 = require("@theia/core/lib/browser/color-application-contribution");
var monaco_theming_service_1 = require("@theia/monaco/lib/browser/monaco-theming-service");
var arduino_daemon_1 = require("../common/protocol/arduino-daemon");
var browser_3 = require("@theia/editor/lib/browser");
var editor_manager_1 = require("./theia/editor/editor-manager");
var connection_status_service_1 = require("./theia/core/connection-status-service");
var connection_status_service_2 = require("@theia/core/lib/browser/connection-status-service");
var boards_data_menu_updater_1 = require("./boards/boards-data-menu-updater");
var boards_data_store_1 = require("./boards/boards-data-store");
var core_1 = require("@theia/core");
var filesystem_ext_1 = require("../common/protocol/filesystem-ext");
var browser_4 = require("@theia/workspace/lib/browser");
var workspace_frontend_contribution_1 = require("./theia/workspace/workspace-frontend-contribution");
var contribution_1 = require("./contributions/contribution");
var new_sketch_1 = require("./contributions/new-sketch");
var open_sketch_1 = require("./contributions/open-sketch");
var close_sketch_1 = require("./contributions/close-sketch");
var save_as_sketch_1 = require("./contributions/save-as-sketch");
var save_sketch_1 = require("./contributions/save-sketch");
var verify_sketch_1 = require("./contributions/verify-sketch");
var upload_sketch_1 = require("./contributions/upload-sketch");
var common_frontend_contribution_1 = require("./theia/core/common-frontend-contribution");
var edit_contributions_1 = require("./contributions/edit-contributions");
var open_sketch_external_1 = require("./contributions/open-sketch-external");
var preferences_contribution_1 = require("@theia/preferences/lib/browser/preferences-contribution");
var preferences_contribution_2 = require("./theia/preferences/preferences-contribution");
var quit_app_1 = require("./contributions/quit-app");
var sketch_control_1 = require("./contributions/sketch-control");
var settings_1 = require("./contributions/settings");
var keybindings_1 = require("./theia/core/keybindings");
var workspace_commands_1 = require("./theia/workspace/workspace-commands");
var workspace_delete_handler_1 = require("@theia/workspace/lib/browser/workspace-delete-handler");
var workspace_delete_handler_2 = require("./theia/workspace/workspace-delete-handler");
var tab_bar_toolbar_2 = require("./theia/core/tab-bar-toolbar");
var editor_widget_factory_1 = require("@theia/editor/lib/browser/editor-widget-factory");
var editor_widget_factory_2 = require("./theia/editor/editor-widget-factory");
var output_widget_1 = require("@theia/output/lib/browser/output-widget");
var output_widget_2 = require("./theia/output/output-widget");
var burn_bootloader_1 = require("./contributions/burn-bootloader");
var examples_service_1 = require("../common/protocol/examples-service");
var examples_1 = require("./contributions/examples");
var include_library_1 = require("./contributions/include-library");
var output_channel_1 = require("@theia/output/lib/common/output-channel");
var output_channel_2 = require("./theia/output/output-channel");
var output_channel_registry_main_1 = require("./theia/plugin-ext/output-channel-registry-main");
var protocol_1 = require("../common/protocol");
var monaco_text_model_service_1 = require("@theia/monaco/lib/browser/monaco-text-model-service");
var monaco_text_model_service_2 = require("./theia/monaco/monaco-text-model-service");
var output_service_impl_1 = require("./output-service-impl");
var output_service_1 = require("../common/protocol/output-service");
var notification_center_1 = require("./notification-center");
var protocol_2 = require("../common/protocol");
var about_1 = require("./contributions/about");
var icon_theme_service_1 = require("@theia/core/lib/browser/icon-theme-service");
var tab_bars_1 = require("./theia/core/tab-bars");
var editor_command_1 = require("./theia/editor/editor-command");
var navigator_tab_bar_decorator_1 = require("@theia/navigator/lib/browser/navigator-tab-bar-decorator");
var navigator_tab_bar_decorator_2 = require("./theia/navigator/navigator-tab-bar-decorator");
var debug_1 = require("./contributions/debug");
var debug_session_manager_1 = require("./theia/debug/debug-session-manager");
var debug_session_manager_2 = require("@theia/debug/lib/browser/debug-session-manager");
var sketchbook_1 = require("./contributions/sketchbook");
var debug_frontend_application_contribution_1 = require("./theia/debug/debug-frontend-application-contribution");
var debug_frontend_application_contribution_2 = require("@theia/debug/lib/browser/debug-frontend-application-contribution");
var board_selection_1 = require("./contributions/board-selection");
var open_recent_sketch_1 = require("./contributions/open-recent-sketch");
var help_1 = require("./contributions/help");
var arduino_preferences_1 = require("./arduino-preferences");
var settings_2 = require("./settings");
var add_file_1 = require("./contributions/add-file");
var archive_sketch_1 = require("./contributions/archive-sketch");
var ElementQueries = require('css-element-queries/src/ElementQueries');
monaco_theming_service_1.MonacoThemingService.register({
    id: 'arduino-theme',
    label: 'Light (Arduino)',
    uiTheme: 'vs',
    json: require('../../src/browser/data/arduino.color-theme.json')
});
exports.default = new inversify_1.ContainerModule(function (bind, unbind, isBound, rebind) {
    ElementQueries.listen();
    ElementQueries.init();
    // Commands and toolbar items
    bind(arduino_frontend_contribution_1.ArduinoFrontendContribution).toSelf().inSingletonScope();
    bind(command_1.CommandContribution).toService(arduino_frontend_contribution_1.ArduinoFrontendContribution);
    bind(menu_1.MenuContribution).toService(arduino_frontend_contribution_1.ArduinoFrontendContribution);
    bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(arduino_frontend_contribution_1.ArduinoFrontendContribution);
    bind(frontend_application_1.FrontendApplicationContribution).toService(arduino_frontend_contribution_1.ArduinoFrontendContribution);
    bind(color_application_contribution_1.ColorContribution).toService(arduino_frontend_contribution_1.ArduinoFrontendContribution);
    bind(arduino_toolbar_contribution_1.ArduinoToolbarContribution).toSelf().inSingletonScope();
    bind(frontend_application_1.FrontendApplicationContribution).toService(arduino_toolbar_contribution_1.ArduinoToolbarContribution);
    // Renderer for both the library and the core widgets.
    bind(list_item_renderer_1.ListItemRenderer).toSelf().inSingletonScope();
    // Library service
    bind(library_service_1.LibraryService).toDynamicValue(function (context) { return ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, library_service_1.LibraryServicePath); }).inSingletonScope();
    // Library list widget
    bind(library_list_widget_1.LibraryListWidget).toSelf();
    view_contribution_1.bindViewContribution(bind, library_widget_frontend_contribution_1.LibraryListWidgetFrontendContribution);
    bind(widget_manager_1.WidgetFactory).toDynamicValue(function (context) { return ({
        id: library_list_widget_1.LibraryListWidget.WIDGET_ID,
        createWidget: function () { return context.container.get(library_list_widget_1.LibraryListWidget); }
    }); });
    bind(frontend_application_1.FrontendApplicationContribution).toService(library_widget_frontend_contribution_1.LibraryListWidgetFrontendContribution);
    // Sketch list service
    bind(sketches_service_1.SketchesService).toDynamicValue(function (context) { return ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, sketches_service_1.SketchesServicePath); }).inSingletonScope();
    bind(sketches_service_client_impl_1.SketchesServiceClientImpl).toSelf().inSingletonScope();
    bind(frontend_application_1.FrontendApplicationContribution).toService(sketches_service_client_impl_1.SketchesServiceClientImpl);
    // Config service
    bind(config_service_1.ConfigService).toDynamicValue(function (context) { return ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, config_service_1.ConfigServicePath); }).inSingletonScope();
    // Boards service
    bind(boards_service_1.BoardsService).toDynamicValue(function (context) { return ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, boards_service_1.BoardsServicePath); }).inSingletonScope();
    // Boards service client to receive and delegate notifications from the backend.
    bind(boards_service_provider_1.BoardsServiceProvider).toSelf().inSingletonScope();
    bind(frontend_application_1.FrontendApplicationContribution).toService(boards_service_provider_1.BoardsServiceProvider);
    // To be able to track, and update the menu based on the core settings (aka. board details) of the currently selected board.
    bind(frontend_application_1.FrontendApplicationContribution).to(boards_data_menu_updater_1.BoardsDataMenuUpdater).inSingletonScope();
    bind(boards_data_store_1.BoardsDataStore).toSelf().inSingletonScope();
    bind(frontend_application_1.FrontendApplicationContribution).toService(boards_data_store_1.BoardsDataStore);
    // Logger for the Arduino daemon
    bind(core_1.ILogger).toDynamicValue(function (ctx) {
        var parentLogger = ctx.container.get(core_1.ILogger);
        return parentLogger.child('store');
    }).inSingletonScope().whenTargetNamed('store');
    // Boards auto-installer
    bind(boards_auto_installer_1.BoardsAutoInstaller).toSelf().inSingletonScope();
    bind(frontend_application_1.FrontendApplicationContribution).toService(boards_auto_installer_1.BoardsAutoInstaller);
    // Boards list widget
    bind(boards_list_widget_1.BoardsListWidget).toSelf();
    view_contribution_1.bindViewContribution(bind, boards_widget_frontend_contribution_1.BoardsListWidgetFrontendContribution);
    bind(widget_manager_1.WidgetFactory).toDynamicValue(function (context) { return ({
        id: boards_list_widget_1.BoardsListWidget.WIDGET_ID,
        createWidget: function () { return context.container.get(boards_list_widget_1.BoardsListWidget); }
    }); });
    bind(frontend_application_1.FrontendApplicationContribution).toService(boards_widget_frontend_contribution_1.BoardsListWidgetFrontendContribution);
    // Board select dialog
    bind(boards_config_dialog_widget_1.BoardsConfigDialogWidget).toSelf().inSingletonScope();
    bind(boards_config_dialog_1.BoardsConfigDialog).toSelf().inSingletonScope();
    bind(boards_config_dialog_1.BoardsConfigDialogProps).toConstantValue({
        title: 'Select Board'
    });
    // Core service
    bind(core_service_1.CoreService).toDynamicValue(function (context) { return ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, core_service_1.CoreServicePath); }).inSingletonScope();
    // Serial monitor
    bind(monitor_model_1.MonitorModel).toSelf().inSingletonScope();
    bind(frontend_application_1.FrontendApplicationContribution).toService(monitor_model_1.MonitorModel);
    bind(monitor_widget_1.MonitorWidget).toSelf();
    view_contribution_1.bindViewContribution(bind, monitor_view_contribution_1.MonitorViewContribution);
    bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(monitor_view_contribution_1.MonitorViewContribution);
    bind(widget_manager_1.WidgetFactory).toDynamicValue(function (context) { return ({
        id: monitor_widget_1.MonitorWidget.ID,
        createWidget: function () { return context.container.get(monitor_widget_1.MonitorWidget); }
    }); });
    // Frontend binding for the serial monitor service
    bind(monitor_service_1.MonitorService).toDynamicValue(function (context) {
        var connection = context.container.get(ws_connection_provider_1.WebSocketConnectionProvider);
        var client = context.container.get(monitor_service_client_impl_1.MonitorServiceClientImpl);
        return connection.createProxy(monitor_service_1.MonitorServicePath, client);
    }).inSingletonScope();
    bind(monitor_connection_1.MonitorConnection).toSelf().inSingletonScope();
    // Serial monitor service client to receive and delegate notifications from the backend.
    bind(monitor_service_client_impl_1.MonitorServiceClientImpl).toSelf().inSingletonScope();
    bind(monitor_service_1.MonitorServiceClient).toDynamicValue(function (context) {
        var client = context.container.get(monitor_service_client_impl_1.MonitorServiceClientImpl);
        ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, monitor_service_1.MonitorServicePath, client);
        return client;
    }).inSingletonScope();
    bind(workspace_service_2.WorkspaceService).toSelf().inSingletonScope();
    rebind(workspace_service_1.WorkspaceService).toService(workspace_service_2.WorkspaceService);
    // Customizing default Theia layout based on the editor mode: `pro-mode` or `classic`.
    bind(editor_mode_1.EditorMode).toSelf().inSingletonScope();
    bind(frontend_application_1.FrontendApplicationContribution).toService(editor_mode_1.EditorMode);
    // Layout and shell customizations.
    rebind(outline_view_contribution_1.OutlineViewContribution).to(outline_contribution_1.OutlineViewContribution).inSingletonScope();
    rebind(problem_contribution_1.ProblemContribution).to(problem_contribution_2.ProblemContribution).inSingletonScope();
    rebind(navigator_contribution_2.FileNavigatorContribution).to(navigator_contribution_1.FileNavigatorContribution).inSingletonScope();
    rebind(editor_contribution_1.EditorContribution).to(editor_contribution_2.EditorContribution).inSingletonScope();
    rebind(monaco_status_bar_contribution_1.MonacoStatusBarContribution).to(monaco_status_bar_contribution_2.MonacoStatusBarContribution).inSingletonScope();
    rebind(browser_1.ApplicationShell).to(application_shell_1.ApplicationShell).inSingletonScope();
    rebind(scm_contribution_1.ScmContribution).to(scm_contribution_2.ScmContribution).inSingletonScope();
    rebind(search_in_workspace_frontend_contribution_1.SearchInWorkspaceFrontendContribution).to(search_in_workspace_frontend_contribution_2.SearchInWorkspaceFrontendContribution).inSingletonScope();
    rebind(frontend_application_1.FrontendApplication).to(frontend_application_2.FrontendApplication).inSingletonScope();
    rebind(browser_4.WorkspaceFrontendContribution).to(workspace_frontend_contribution_1.WorkspaceFrontendContribution).inSingletonScope();
    rebind(browser_4.FileMenuContribution).to(workspace_frontend_contribution_1.ArduinoFileMenuContribution).inSingletonScope();
    rebind(browser_1.CommonFrontendContribution).to(common_frontend_contribution_1.CommonFrontendContribution).inSingletonScope();
    rebind(preferences_contribution_1.PreferencesContribution).to(preferences_contribution_2.PreferencesContribution).inSingletonScope();
    rebind(browser_1.KeybindingRegistry).to(keybindings_1.KeybindingRegistry).inSingletonScope();
    rebind(browser_4.WorkspaceCommandContribution).to(workspace_commands_1.WorkspaceCommandContribution).inSingletonScope();
    rebind(workspace_delete_handler_1.WorkspaceDeleteHandler).to(workspace_delete_handler_2.WorkspaceDeleteHandler).inSingletonScope();
    rebind(editor_widget_factory_1.EditorWidgetFactory).to(editor_widget_factory_2.EditorWidgetFactory).inSingletonScope();
    rebind(tab_bar_toolbar_1.TabBarToolbarFactory).toFactory(function (_a) {
        var parentContainer = _a.container;
        return function () {
            var container = parentContainer.createChild();
            container.bind(tab_bar_toolbar_2.TabBarToolbar).toSelf().inSingletonScope();
            return container.get(tab_bar_toolbar_2.TabBarToolbar);
        };
    });
    bind(output_widget_2.OutputWidget).toSelf().inSingletonScope();
    rebind(output_widget_1.OutputWidget).toService(output_widget_2.OutputWidget);
    bind(output_channel_2.OutputChannelManager).toSelf().inSingletonScope();
    rebind(output_channel_1.OutputChannelManager).toService(output_channel_2.OutputChannelManager);
    bind(output_channel_registry_main_1.OutputChannelRegistryMainImpl).toSelf().inTransientScope();
    rebind(output_channel_registry_main_1.OutputChannelRegistryMainImpl).toService(output_channel_registry_main_1.OutputChannelRegistryMainImpl);
    bind(monaco_text_model_service_2.MonacoTextModelService).toSelf().inSingletonScope();
    rebind(monaco_text_model_service_1.MonacoTextModelService).toService(monaco_text_model_service_2.MonacoTextModelService);
    // Show a disconnected status bar, when the daemon is not available
    bind(connection_status_service_1.ApplicationConnectionStatusContribution).toSelf().inSingletonScope();
    rebind(connection_status_service_2.ApplicationConnectionStatusContribution).toService(connection_status_service_1.ApplicationConnectionStatusContribution);
    bind(connection_status_service_1.FrontendConnectionStatusService).toSelf().inSingletonScope();
    rebind(connection_status_service_2.FrontendConnectionStatusService).toService(connection_status_service_1.FrontendConnectionStatusService);
    // Editor customizations. Sets the editor to `readOnly` if under the data dir.
    bind(editor_manager_1.EditorManager).toSelf().inSingletonScope();
    rebind(browser_3.EditorManager).toService(editor_manager_1.EditorManager);
    // Decorator customizations
    bind(tab_bar_decorator_2.TabBarDecoratorService).toSelf().inSingletonScope();
    rebind(tab_bar_decorator_1.TabBarDecoratorService).toService(tab_bar_decorator_2.TabBarDecoratorService);
    // Problem markers
    bind(problem_manager_1.ProblemManager).toSelf().inSingletonScope();
    rebind(browser_2.ProblemManager).toService(problem_manager_1.ProblemManager);
    // Customized layout restorer that can restore the state in async way: https://github.com/eclipse-theia/theia/issues/6579
    bind(shell_layout_restorer_1.ShellLayoutRestorer).toSelf().inSingletonScope();
    rebind(browser_1.ShellLayoutRestorer).toService(shell_layout_restorer_1.ShellLayoutRestorer);
    bind(arduino_daemon_1.ArduinoDaemon).toDynamicValue(function (context) { return ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, arduino_daemon_1.ArduinoDaemonPath); }).inSingletonScope();
    // File-system extension
    bind(filesystem_ext_1.FileSystemExt).toDynamicValue(function (context) { return ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, filesystem_ext_1.FileSystemExtPath); }).inSingletonScope();
    // Examples service@
    bind(examples_service_1.ExamplesService).toDynamicValue(function (context) { return ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, examples_service_1.ExamplesServicePath); }).inSingletonScope();
    // Executable URIs known by the backend
    bind(protocol_1.ExecutableService).toDynamicValue(function (context) { return ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, protocol_1.ExecutableServicePath); }).inSingletonScope();
    contribution_1.Contribution.configure(bind, new_sketch_1.NewSketch);
    contribution_1.Contribution.configure(bind, open_sketch_1.OpenSketch);
    contribution_1.Contribution.configure(bind, close_sketch_1.CloseSketch);
    contribution_1.Contribution.configure(bind, save_sketch_1.SaveSketch);
    contribution_1.Contribution.configure(bind, save_as_sketch_1.SaveAsSketch);
    contribution_1.Contribution.configure(bind, verify_sketch_1.VerifySketch);
    contribution_1.Contribution.configure(bind, upload_sketch_1.UploadSketch);
    contribution_1.Contribution.configure(bind, open_sketch_external_1.OpenSketchExternal);
    contribution_1.Contribution.configure(bind, edit_contributions_1.EditContributions);
    contribution_1.Contribution.configure(bind, quit_app_1.QuitApp);
    contribution_1.Contribution.configure(bind, sketch_control_1.SketchControl);
    contribution_1.Contribution.configure(bind, settings_1.Settings);
    contribution_1.Contribution.configure(bind, burn_bootloader_1.BurnBootloader);
    contribution_1.Contribution.configure(bind, examples_1.BuiltInExamples);
    contribution_1.Contribution.configure(bind, examples_1.LibraryExamples);
    contribution_1.Contribution.configure(bind, include_library_1.IncludeLibrary);
    contribution_1.Contribution.configure(bind, about_1.About);
    contribution_1.Contribution.configure(bind, debug_1.Debug);
    contribution_1.Contribution.configure(bind, sketchbook_1.Sketchbook);
    contribution_1.Contribution.configure(bind, board_selection_1.BoardSelection);
    contribution_1.Contribution.configure(bind, open_recent_sketch_1.OpenRecentSketch);
    contribution_1.Contribution.configure(bind, help_1.Help);
    contribution_1.Contribution.configure(bind, add_file_1.AddFile);
    contribution_1.Contribution.configure(bind, archive_sketch_1.ArchiveSketch);
    bind(output_service_impl_1.OutputServiceImpl).toSelf().inSingletonScope().onActivation(function (_a, outputService) {
        var container = _a.container;
        ws_connection_provider_1.WebSocketConnectionProvider.createProxy(container, output_service_1.OutputServicePath, outputService);
        return outputService;
    });
    bind(output_service_1.OutputService).toService(output_service_impl_1.OutputServiceImpl);
    bind(notification_center_1.NotificationCenter).toSelf().inSingletonScope();
    bind(frontend_application_1.FrontendApplicationContribution).toService(notification_center_1.NotificationCenter);
    bind(protocol_2.NotificationServiceServer).toDynamicValue(function (context) { return ws_connection_provider_1.WebSocketConnectionProvider.createProxy(context.container, protocol_2.NotificationServicePath); }).inSingletonScope();
    // Enable the dirty indicator on uncloseable widgets.
    rebind(browser_1.TabBarRendererFactory).toFactory(function (context) { return function () {
        var contextMenuRenderer = context.container.get(browser_1.ContextMenuRenderer);
        var decoratorService = context.container.get(tab_bar_decorator_2.TabBarDecoratorService);
        var iconThemeService = context.container.get(icon_theme_service_1.IconThemeService);
        return new tab_bars_1.TabBarRenderer(contextMenuRenderer, decoratorService, iconThemeService);
    }; });
    // Workaround for https://github.com/eclipse-theia/theia/issues/8722
    // Do not trigger a save on IDE startup if `"editor.autoSave": "on"` was set as a preference.
    bind(editor_command_1.EditorCommandContribution).toSelf().inSingletonScope();
    rebind(browser_3.EditorCommandContribution).toService(editor_command_1.EditorCommandContribution);
    // Silent the badge decoration in the Explorer view.
    bind(navigator_tab_bar_decorator_2.NavigatorTabBarDecorator).toSelf().inSingletonScope();
    rebind(navigator_tab_bar_decorator_1.NavigatorTabBarDecorator).toService(navigator_tab_bar_decorator_2.NavigatorTabBarDecorator);
    // To avoid running `Save All` when there are no dirty editors before starting the debug session.
    bind(debug_session_manager_1.DebugSessionManager).toSelf().inSingletonScope();
    rebind(debug_session_manager_2.DebugSessionManager).toService(debug_session_manager_1.DebugSessionManager);
    // To remove the `Run` menu item from the application menu.
    bind(debug_frontend_application_contribution_1.DebugFrontendApplicationContribution).toSelf().inSingletonScope();
    rebind(debug_frontend_application_contribution_2.DebugFrontendApplicationContribution).toService(debug_frontend_application_contribution_1.DebugFrontendApplicationContribution);
    // Preferences
    arduino_preferences_1.bindArduinoPreferences(bind);
    // Settings wrapper for the preferences and the CLI config.
    bind(settings_2.SettingsService).toSelf().inSingletonScope();
    // Settings dialog and widget
    bind(settings_2.SettingsWidget).toSelf().inSingletonScope();
    bind(settings_2.SettingsDialog).toSelf().inSingletonScope();
    bind(settings_2.SettingsDialogProps).toConstantValue({
        title: 'Preferences'
    });
});
//# sourceMappingURL=arduino-ide-frontend-module.js.map