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={rendering:"Rendering",showRendering:"Show Rendering",paint:"paint",layout:"layout",fps:"fps",cssMediaType:"CSS media type",cssMediaFeature:"CSS media feature",visionDeficiency:"vision deficiency",colorVisionDeficiency:"color vision deficiency",reloadPage:"Reload page",hardReloadPage:"Hard reload page",forceAdBlocking:"Force ad blocking on this site",blockAds:"Block ads on this site",showAds:"Show ads on this site, if allowed",autoOpenDevTools:"Auto-open DevTools for popups",doNotAutoOpen:"Do not auto-open DevTools for popups",disablePaused:"Disable paused state overlay"},str_=i18n.i18n.registerUIStrings("inspector_main/inspector_main-meta.ts",UIStrings),i18nLazyString=i18n.i18n.getLazilyComputedLocalizedString.bind(void 0,str_);let loadedInspectorMainModule;async function loadInspectorMainModule(){return loadedInspectorMainModule||(await Root.Runtime.Runtime.instance().loadModulePromise("inspector_main"),loadedInspectorMainModule=await import("./inspector_main.js")),loadedInspectorMainModule}UI.ViewManager.registerViewExtension({location:"drawer-view",id:"rendering",title:i18nLazyString(UIStrings.rendering),commandPrompt:i18nLazyString(UIStrings.showRendering),persistence:"closeable",order:50,loadView:async()=>(await loadInspectorMainModule()).RenderingOptions.RenderingOptionsView.instance(),tags:[i18nLazyString(UIStrings.paint),i18nLazyString(UIStrings.layout),i18nLazyString(UIStrings.fps),i18nLazyString(UIStrings.cssMediaType),i18nLazyString(UIStrings.cssMediaFeature),i18nLazyString(UIStrings.visionDeficiency),i18nLazyString(UIStrings.colorVisionDeficiency)]}),UI.ActionRegistration.registerActionExtension({category:UI.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await loadInspectorMainModule()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"largeicon-refresh",title:i18nLazyString(UIStrings.reloadPage),bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),UI.ActionRegistration.registerActionExtension({category:UI.ActionRegistration.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await loadInspectorMainModule()).InspectorMain.ReloadActionDelegate.instance(),title:i18nLazyString(UIStrings.hardReloadPage),bindings:[{platform:"windows,linux",shortcut:"Shift+Ctrl+R"},{platform:"windows,linux",shortcut:"Shift+F5"},{platform:"windows,linux",shortcut:"Ctrl+F5"},{platform:"windows,linux",shortcut:"Ctrl+Shift+F5"},{platform:"mac",shortcut:"Shift+Meta+R"}]}),Common.Settings.registerSettingExtension({category:"NETWORK",title:i18nLazyString(UIStrings.forceAdBlocking),settingName:"network.adBlockingEnabled",settingType:"boolean",storageType:Common.Settings.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:i18nLazyString(UIStrings.blockAds)},{value:!1,title:i18nLazyString(UIStrings.showAds)}]}),Common.Settings.registerSettingExtension({category:"GLOBAL",title:i18nLazyString(UIStrings.autoOpenDevTools),settingName:"autoAttachToCreatedPages",settingType:"boolean",order:2,defaultValue:!1,options:[{value:!0,title:i18nLazyString(UIStrings.autoOpenDevTools)},{value:!1,title:i18nLazyString(UIStrings.doNotAutoOpen)}]}),Common.Settings.registerSettingExtension({category:"APPEARANCE",title:i18nLazyString(UIStrings.disablePaused),settingName:"disablePausedStateOverlay",settingType:"boolean",defaultValue:!1}),UI.Toolbar.registerToolbarItem({loadItem:async()=>(await loadInspectorMainModule()).InspectorMain.NodeIndicator.instance(),order:2,location:UI.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_LEFT,showLabel:void 0,condition:void 0,separator:void 0,actionId:void 0});