import*as i18n from"../i18n/i18n.js";import*as Root from"../root/root.js";import*as UI from"../ui/ui.js";const UIStrings={coverage:"Coverage",showCoverage:"Show Coverage",instrumentCoverage:"Instrument coverage",stopInstrumentingCoverageAndShow:"Stop instrumenting coverage and show results",startInstrumentingCoverageAnd:"Start instrumenting coverage and reload page"},str_=i18n.i18n.registerUIStrings("coverage/coverage-meta.ts",UIStrings),i18nLazyString=i18n.i18n.getLazilyComputedLocalizedString.bind(void 0,str_);let loadedCoverageModule;async function loadCoverageModule(){return loadedCoverageModule||(await Root.Runtime.Runtime.instance().loadModulePromise("coverage"),loadedCoverageModule=await import("./coverage.js")),loadedCoverageModule}UI.ViewManager.registerViewExtension({location:"drawer-view",id:"coverage",title:i18nLazyString(UIStrings.coverage),commandPrompt:i18nLazyString(UIStrings.showCoverage),persistence:"closeable",order:100,loadView:async()=>(await loadCoverageModule()).CoverageView.CoverageView.instance()}),UI.ActionRegistration.registerActionExtension({actionId:"coverage.toggle-recording",iconClass:"largeicon-start-recording",toggleable:!0,toggledIconClass:"largeicon-stop-recording",toggleWithRedColor:!0,loadActionDelegate:async()=>(await loadCoverageModule()).CoverageView.ActionDelegate.instance(),category:UI.ActionRegistration.ActionCategory.PERFORMANCE,options:[{value:!0,title:i18nLazyString(UIStrings.instrumentCoverage)},{value:!1,title:i18nLazyString(UIStrings.stopInstrumentingCoverageAndShow)}]}),UI.ActionRegistration.registerActionExtension({actionId:"coverage.start-with-reload",iconClass:"largeicon-refresh",loadActionDelegate:async()=>(await loadCoverageModule()).CoverageView.ActionDelegate.instance(),category:UI.ActionRegistration.ActionCategory.PERFORMANCE,title:i18nLazyString(UIStrings.startInstrumentingCoverageAnd)});