import*as e from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";import*as i from"../../core/common/common.js";import*as n from"../../core/root/root.js";import*as o from"../../ui/components/legacy_wrapper/legacy_wrapper.js";const s={devices:"Devices",showDevices:"Show Devices"},a=e.i18n.registerUIStrings("panels/settings/emulation/emulation-meta.ts",s),r=e.i18n.getLazilyComputedLocalizedString.bind(void 0,a);let c;t.ViewManager.registerViewExtension({location:"settings-view",commandPrompt:r(s.showDevices),title:r(s.devices),order:30,loadView:async()=>new((await async function(){return c||(c=await import("./emulation/emulation.js")),c}()).DevicesSettingsTab.DevicesSettingsTab),id:"devices",settings:["standard-emulated-device-list","custom-emulated-device-list"],iconName:"devices"});const g={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",aiInnovations:"AI innovations",showAiInnovations:"Show AI innovations"},l=e.i18n.registerUIStrings("panels/settings/settings-meta.ts",g),d=e.i18n.getLazilyComputedLocalizedString.bind(void 0,l);let m;async function w(){return m||(m=await import("./settings.js")),m}t.ViewManager.registerViewExtension({location:"settings-view",id:"preferences",title:d(g.preferences),commandPrompt:d(g.showPreferences),order:0,loadView:async()=>new((await w()).SettingsScreen.GenericSettingsTab),iconName:"gear"}),t.ViewManager.registerViewExtension({location:"settings-view",id:"chrome-ai",title:d(g.aiInnovations),commandPrompt:d(g.showAiInnovations),order:2,async loadView(){const e=await w();return o.LegacyWrapper.legacyWrapper(t.Widget.VBox,new e.AISettingsTab.AISettingsTab)},iconName:"button-magic",settings:["console-insights-enabled"],condition:e=>(e?.aidaAvailability?.enabled&&(e?.devToolsConsoleInsights?.enabled||e?.devToolsFreestyler?.enabled))??!1}),t.ViewManager.registerViewExtension({location:"settings-view",id:"experiments",title:d(g.experiments),commandPrompt:d(g.showExperiments),order:3,experiment:"*",loadView:async()=>new((await w()).SettingsScreen.ExperimentsSettingsTab),iconName:"experiment"}),t.ViewManager.registerViewExtension({location:"settings-view",id:"blackbox",title:d(g.ignoreList),commandPrompt:d(g.showIgnoreList),order:4,loadView:async()=>new((await w()).FrameworkIgnoreListSettingsTab.FrameworkIgnoreListSettingsTab),iconName:"clear-list"}),t.ViewManager.registerViewExtension({location:"settings-view",id:"keybinds",title:d(g.shortcuts),commandPrompt:d(g.showShortcuts),order:100,loadView:async()=>new((await w()).KeybindsSettingsTab.KeybindsSettingsTab),iconName:"keyboard"}),t.ActionRegistration.registerActionExtension({category:"SETTINGS",actionId:"settings.show",title:d(g.settings),loadActionDelegate:async()=>new((await w()).SettingsScreen.ActionDelegate),iconClass:"gear",bindings:[{shortcut:"F1",keybindSets:["devToolsDefault"]},{shortcut:"Shift+?"},{platform:"windows,linux",shortcut:"Ctrl+,",keybindSets:["vsCode"]},{platform:"mac",shortcut:"Meta+,",keybindSets:["vsCode"]}]}),t.ActionRegistration.registerActionExtension({category:"SETTINGS",actionId:"settings.documentation",title:d(g.documentation),loadActionDelegate:async()=>new((await w()).SettingsScreen.ActionDelegate)}),t.ActionRegistration.registerActionExtension({category:"SETTINGS",actionId:"settings.shortcuts",title:d(g.showShortcuts),loadActionDelegate:async()=>new((await w()).SettingsScreen.ActionDelegate),bindings:[{platform:"windows,linux",shortcut:"Ctrl+K Ctrl+S",keybindSets:["vsCode"]},{platform:"mac",shortcut:"Meta+K Meta+S",keybindSets:["vsCode"]}]}),t.ViewManager.registerLocationResolver({name:"settings-view",category:"SETTINGS",loadResolver:async()=>(await w()).SettingsScreen.SettingsScreen.instance()}),i.Revealer.registerRevealer({contextTypes:()=>[i.Settings.Setting,n.Runtime.Experiment],destination:void 0,loadRevealer:async()=>new((await w()).SettingsScreen.Revealer)}),t.ContextMenu.registerItem({location:"mainMenu/footer",actionId:"settings.shortcuts",order:void 0}),t.ContextMenu.registerItem({location:"mainMenuHelp/default",actionId:"settings.documentation",order:void 0});
