import*as e from"../../core/i18n/i18n.js";import*as r from"../../ui/legacy/legacy.js";const o={recorder:"Recorder",showRecorder:"Show Recorder",startStopRecording:"Start/Stop recording",createRecording:"Create a new recording",replayRecording:"Replay recording",toggleCode:"Toggle code view"},t=e.i18n.registerUIStrings("panels/recorder/recorder-meta.ts",o),c=e.i18n.getLazilyComputedLocalizedString.bind(void 0,t);let n;async function i(){return n||(n=await import("./recorder.js")),n}function a(e,r){return void 0===n?[]:r&&n.RecorderPanel.RecorderPanel.instance().isActionPossible(r)?e(n):[]}r.ViewManager.defaultOptionsForTabs.chrome_recorder=!0,r.ViewManager.registerViewExtension({location:"panel",id:"chrome-recorder",commandPrompt:c(o.showRecorder),title:c(o.recorder),order:90,persistence:"closeable",isPreviewFeature:!0,loadView:async()=>(await i()).RecorderPanel.RecorderPanel.instance()}),r.ActionRegistration.registerActionExtension({category:"RECORDER",actionId:"chrome-recorder.create-recording",title:c(o.createRecording),loadActionDelegate:async()=>new((await i()).RecorderPanel.ActionDelegate)}),r.ActionRegistration.registerActionExtension({category:"RECORDER",actionId:"chrome-recorder.start-recording",title:c(o.startStopRecording),contextTypes:()=>a((e=>[e.RecorderPanel.RecorderPanel]),"chrome-recorder.start-recording"),loadActionDelegate:async()=>new((await i()).RecorderPanel.ActionDelegate),bindings:[{shortcut:"Ctrl+E",platform:"windows,linux"},{shortcut:"Meta+E",platform:"mac"}]}),r.ActionRegistration.registerActionExtension({category:"RECORDER",actionId:"chrome-recorder.replay-recording",title:c(o.replayRecording),contextTypes:()=>a((e=>[e.RecorderPanel.RecorderPanel]),"chrome-recorder.replay-recording"),loadActionDelegate:async()=>new((await i()).RecorderPanel.ActionDelegate),bindings:[{shortcut:"Ctrl+Enter",platform:"windows,linux"},{shortcut:"Meta+Enter",platform:"mac"}]}),r.ActionRegistration.registerActionExtension({category:"RECORDER",actionId:"chrome-recorder.toggle-code-view",title:c(o.toggleCode),contextTypes:()=>a((e=>[e.RecorderPanel.RecorderPanel]),"chrome-recorder.toggle-code-view"),loadActionDelegate:async()=>new((await i()).RecorderPanel.ActionDelegate),bindings:[{shortcut:"Ctrl+B",platform:"windows,linux"},{shortcut:"Meta+B",platform:"mac"}]});
