import{ls as e}from"../platform/platform.js";import{Runtime as t}from"../root/root.js";import{ViewManager as o,ActionRegistration as i}from"../ui/ui.js";let r;async function a(){return r||(await t.Runtime.instance().loadModulePromise("resources"),r=await import("./resources.js")),r}o.registerViewExtension({location:"panel",id:"resources",title:()=>e`Application`,commandPrompt:()=>e`Show Application`,order:70,loadView:async()=>(await a()).ResourcesPanel.ResourcesPanel.instance(),tags:[()=>e`pwa`]}),i.registerActionExtension({category:i.ActionCategory.RESOURCES,actionId:"resources.clear",title:()=>e`Clear site data`,loadActionDelegate:async()=>(await a()).StorageView.ActionDelegate.instance()}),i.registerActionExtension({category:i.ActionCategory.RESOURCES,actionId:"resources.clear-incl-third-party-cookies",title:()=>e`Clear site data (including third-party cookies)`,loadActionDelegate:async()=>(await a()).StorageView.ActionDelegate.instance()}),i.registerActionExtension({actionId:"background-service.toggle-recording",iconClass:"largeicon-start-recording",toggleable:!0,toggledIconClass:"largeicon-stop-recording",toggleWithRedColor:!0,contextTypes(){return e=e=>[e.BackgroundServiceView.BackgroundServiceView],void 0===r?[]:e(r);var e},loadActionDelegate:async()=>(await a()).BackgroundServiceView.ActionDelegate.instance(),category:i.ActionCategory.BACKGROUND_SERVICES,options:[{value:!0,title:()=>e`Start recording events`},{value:!1,title:()=>e`Stop recording events`}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]});
