import*as e from"../../core/common/common.js";import*as t from"../../core/i18n/i18n.js";import*as a from"../../ui/legacy/legacy.js";const o={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:"Don't show what's new after each update"},n=t.i18n.registerUIStrings("panels/whats_new/whats_new-meta.ts",o),i=t.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let s;async function r(){return s||(s=await import("./whats_new.js")),s}a.ViewManager.maybeRemoveViewExtension("release-note"),a.ActionRegistration.maybeRemoveActionExtension("help.release-notes"),a.ActionRegistration.maybeRemoveActionExtension("help.report-issue"),e.Settings.maybeRemoveSettingExtension("help.show-release-note"),a.ContextMenu.maybeRemoveItem({location:"mainMenuHelp/default",actionId:"help.release-notes",order:void 0}),a.ContextMenu.maybeRemoveItem({location:"mainMenuHelp/default",actionId:"help.report-issue",order:void 0}),e.Runnable.maybeRemoveLateInitializationRunnable("whats-new"),a.ViewManager.registerViewExtension({location:"drawer-view",id:"release-note",title:i(o.whatsNew),commandPrompt:i(o.showWhatsNew),persistence:"closeable",order:1,loadView:async()=>new((await r()).ReleaseNoteView.ReleaseNoteView)}),a.ActionRegistration.registerActionExtension({category:"HELP",actionId:"help.release-notes",title:i(o.releaseNotes),loadActionDelegate:async()=>(await r()).WhatsNew.ReleaseNotesActionDelegate.instance()}),a.ActionRegistration.registerActionExtension({category:"HELP",actionId:"help.report-issue",title:i(o.reportADevtoolsIssue),loadActionDelegate:async()=>(await r()).WhatsNew.ReportIssueActionDelegate.instance(),tags:[i(o.bug)]}),e.Settings.registerSettingExtension({category:"APPEARANCE",title:i(o.showWhatsNewAfterEachUpdate),settingName:"help.show-release-note",settingType:"boolean",defaultValue:!0,options:[{value:!0,title:i(o.showWhatsNewAfterEachUpdate)},{value:!1,title:i(o.doNotShowWhatsNewAfterEachUpdate)}]}),a.ContextMenu.registerItem({location:"mainMenuHelp/default",actionId:"help.release-notes",order:10}),a.ContextMenu.registerItem({location:"mainMenuHelp/default",actionId:"help.report-issue",order:11}),e.Runnable.registerLateInitializationRunnable({id:"whats-new",loadRunnable:async()=>(await r()).WhatsNew.HelpLateInitialization.instance()});
