import*as Common from"../common/common.js";import*as i18n from"../i18n/i18n.js";import*as Root from"../root/root.js";import*as UI from"../ui/ui.js";const UIStrings={shortcuts:"Shortcuts",preferences:"Preferences",experiments:"Experiments",ignoreList:"Ignore List",showShortcuts:"Show Shortcuts",showPreferences:"Show Preferences",showExperiments:"Show Experiments",showIgnoreList:"Show Ignore List",settings:"Settings",documentation:"Documentation"},str_=i18n.i18n.registerUIStrings("settings/settings-meta.ts",UIStrings),i18nLazyString=i18n.i18n.getLazilyComputedLocalizedString.bind(void 0,str_);let loadedSettingsModule;async function loadSettingsModule(){return loadedSettingsModule||(await Root.Runtime.Runtime.instance().loadModulePromise("settings"),loadedSettingsModule=await import("./settings.js")),loadedSettingsModule}UI.ViewManager.registerViewExtension({location:"settings-view",id:"preferences",title:i18nLazyString(UIStrings.preferences),commandPrompt:i18nLazyString(UIStrings.showPreferences),order:0,loadView:async()=>(await loadSettingsModule()).SettingsScreen.GenericSettingsTab.instance()}),UI.ViewManager.registerViewExtension({location:"settings-view",id:"experiments",title:i18nLazyString(UIStrings.experiments),commandPrompt:i18nLazyString(UIStrings.showExperiments),order:3,experiment:Root.Runtime.ExperimentName.ALL,loadView:async()=>(await loadSettingsModule()).SettingsScreen.ExperimentsSettingsTab.instance()}),UI.ViewManager.registerViewExtension({location:"settings-view",id:"blackbox",title:i18nLazyString(UIStrings.ignoreList),commandPrompt:i18nLazyString(UIStrings.showIgnoreList),order:4,loadView:async()=>(await loadSettingsModule()).FrameworkIgnoreListSettingsTab.FrameworkIgnoreListSettingsTab.instance()}),UI.ViewManager.registerViewExtension({location:"settings-view",id:"keybinds",title:i18nLazyString(UIStrings.shortcuts),commandPrompt:i18nLazyString(UIStrings.showShortcuts),order:100,loadView:async()=>(await loadSettingsModule()).KeybindsSettingsTab.KeybindsSettingsTab.instance()}),UI.ActionRegistration.registerActionExtension({category:UI.ActionRegistration.ActionCategory.SETTINGS,actionId:"settings.show",title:i18nLazyString(UIStrings.settings),loadActionDelegate:async()=>(await loadSettingsModule()).SettingsScreen.ActionDelegate.instance(),iconClass:"largeicon-settings-gear",bindings:[{shortcut:"F1",keybindSets:["devToolsDefault"]},{shortcut:"Shift+?"},{platform:"windows,linux",shortcut:"Ctrl+,",keybindSets:["vsCode"]},{platform:"mac",shortcut:"Meta+,",keybindSets:["vsCode"]}]}),UI.ActionRegistration.registerActionExtension({category:UI.ActionRegistration.ActionCategory.SETTINGS,actionId:"settings.documentation",title:i18nLazyString(UIStrings.documentation),loadActionDelegate:async()=>(await loadSettingsModule()).SettingsScreen.ActionDelegate.instance()}),UI.ActionRegistration.registerActionExtension({category:UI.ActionRegistration.ActionCategory.SETTINGS,actionId:"settings.shortcuts",title:i18nLazyString(UIStrings.shortcuts),loadActionDelegate:async()=>(await loadSettingsModule()).SettingsScreen.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+K Ctrl+S",keybindSets:["vsCode"]},{platform:"mac",shortcut:"Meta+K Meta+S",keybindSets:["vsCode"]}]}),UI.ViewManager.registerLocationResolver({name:"settings-view",category:UI.ViewManager.ViewLocationCategoryValues.SETTINGS,loadResolver:async()=>(await loadSettingsModule()).SettingsScreen.SettingsScreen.instance()}),Common.Revealer.registerRevealer({contextTypes:()=>[Common.Settings.Setting],loadRevealer:async()=>(await loadSettingsModule()).SettingsScreen.Revealer.instance(),destination:void 0}),UI.ContextMenu.registerItem({location:UI.ContextMenu.ItemLocation.MAIN_MENU_FOOTER,actionId:"settings.shortcuts",order:void 0}),UI.ContextMenu.registerItem({location:UI.ContextMenu.ItemLocation.MAIN_MENU_HELP_DEFAULT,actionId:"settings.documentation",order:void 0});