import{Settings as t}from"../common/common.js";import{ls as e}from"../platform/platform.js";import{Runtime as o}from"../root/root.js";import{ViewManager as i,ActionRegistration as n}from"../ui/ui.js";let a;async function r(){return a||(await o.Runtime.instance().loadModulePromise("inspector_main"),a=await import("./inspector_main.js")),a}i.registerViewExtension({location:"drawer-view",id:"rendering",title:()=>e`Rendering`,commandPrompt:()=>e`Show Rendering`,persistence:"closeable",order:50,loadView:async()=>(await r()).RenderingOptions.RenderingOptionsView.instance(),tags:[()=>e`paint`,()=>e`layout`,()=>e`fps`,()=>e`CSS media type`,()=>e`CSS media feature`,()=>e`vision deficiency`,()=>e`color vision deficiency`]}),n.registerActionExtension({category:n.ActionCategory.NAVIGATION,actionId:"inspector_main.reload",loadActionDelegate:async()=>(await r()).InspectorMain.ReloadActionDelegate.instance(),iconClass:"largeicon-refresh",title:()=>e`Reload page`,bindings:[{platform:"windows,linux",shortcut:"Ctrl+R"},{platform:"windows,linux",shortcut:"F5"},{platform:"mac",shortcut:"Meta+R"}]}),n.registerActionExtension({category:n.ActionCategory.NAVIGATION,actionId:"inspector_main.hard-reload",loadActionDelegate:async()=>(await r()).InspectorMain.ReloadActionDelegate.instance(),title:()=>e`Hard reload page`,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"}]}),t.registerSettingExtension({category:t.SettingCategoryObject.NETWORK,title:()=>e`Force ad blocking on this site`,settingName:"network.adBlockingEnabled",settingType:t.SettingTypeObject.BOOLEAN,storageType:t.SettingStorageType.Session,defaultValue:!1,options:[{value:!0,title:()=>e`Block ads on this site`},{value:!1,title:()=>e`Show ads on this site, if allowed`}]}),t.registerSettingExtension({category:t.SettingCategoryObject.GLOBAL,title:()=>e`Auto-open DevTools for popups`,settingName:"autoAttachToCreatedPages",settingType:t.SettingTypeObject.BOOLEAN,order:2,defaultValue:!1,options:[{value:!0,title:()=>e`Auto-open DevTools for popups`},{value:!1,title:()=>e`Do not auto-open DevTools for popups`}]}),t.registerSettingExtension({category:t.SettingCategoryObject.APPEARANCE,title:()=>e`Don't show Chrome Data Saver warning`,settingName:"disableDataSaverInfobar",settingType:t.SettingTypeObject.BOOLEAN,defaultValue:!1}),t.registerSettingExtension({category:t.SettingCategoryObject.APPEARANCE,title:()=>e`Disable paused state overlay`,settingName:"disablePausedStateOverlay",settingType:t.SettingTypeObject.BOOLEAN,defaultValue:!1});
