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={whatsNew:"What's New",showWhatsNew:"Show What's New",releaseNotes:"Release notes",reportADevtoolsIssue:"Report a DevTools issue",bug:"bug",showWhatsNewAfterEachUpdate:"Show What's New after each update",doNotShowWhatsNewAfterEachUpdate:"Do not show What's New after each update"},str_=i18n.i18n.registerUIStrings("help/help-meta.ts",UIStrings),i18nLazyString=i18n.i18n.getLazilyComputedLocalizedString.bind(void 0,str_);let loadedHelpModule;async function loadHelpModule(){return loadedHelpModule||(await Root.Runtime.Runtime.instance().loadModulePromise("help"),loadedHelpModule=await import("./help.js")),loadedHelpModule}UI.ViewManager.registerViewExtension({location:"drawer-view",id:"release-note",title:i18nLazyString(UIStrings.whatsNew),commandPrompt:i18nLazyString(UIStrings.showWhatsNew),persistence:"closeable",order:1,loadView:async()=>(await loadHelpModule()).ReleaseNoteView.ReleaseNoteView.instance()}),UI.ActionRegistration.registerActionExtension({category:UI.ActionRegistration.ActionCategory.HELP,actionId:"help.release-notes",title:i18nLazyString(UIStrings.releaseNotes),loadActionDelegate:async()=>(await loadHelpModule()).Help.ReleaseNotesActionDelegate.instance()}),UI.ActionRegistration.registerActionExtension({category:UI.ActionRegistration.ActionCategory.HELP,actionId:"help.report-issue",title:i18nLazyString(UIStrings.reportADevtoolsIssue),loadActionDelegate:async()=>(await loadHelpModule()).Help.ReportIssueActionDelegate.instance(),tags:[i18nLazyString(UIStrings.bug)]}),Common.Settings.registerSettingExtension({category:"APPEARANCE",title:i18nLazyString(UIStrings.showWhatsNewAfterEachUpdate),settingName:"help.show-release-note",settingType:"boolean",defaultValue:!0,options:[{value:!0,title:i18nLazyString(UIStrings.showWhatsNewAfterEachUpdate)},{value:!1,title:i18nLazyString(UIStrings.doNotShowWhatsNewAfterEachUpdate)}]}),UI.ContextMenu.registerItem({location:UI.ContextMenu.ItemLocation.MAIN_MENU_HELP_DEFAULT,actionId:"help.release-notes",order:10}),UI.ContextMenu.registerItem({location:UI.ContextMenu.ItemLocation.MAIN_MENU_HELP_DEFAULT,actionId:"help.report-issue",order:11});