(self.webpackChunk_retrolab_lab_extension=self.webpackChunk_retrolab_lab_extension||[]).push([[568],{568:(e,o,a)=>{"use strict";a.r(o),a.d(o,{default:()=>p});var n,t=a(678),r=a(493),l=a(40),c=a(275),d=a(899),i=a(465),b=a(800),m=a(367),u=a(441);!function(e){e.launchRetroTree="retrolab:launch-tree",e.openRetro="retrolab:open-retro",e.openClassic="retrolab:open-classic",e.openLab="retrolab:open-lab"}(n||(n={}));const s={id:"@retrolab/lab-extension:interface-switcher",autoStart:!0,optional:[d.INotebookTracker,r.ICommandPalette,c.IMainMenu,m.IRetroShell,t.ILabShell],activate:(e,o,a,n,t,c)=>{if(!o)return;const{commands:d,shell:i}=e,m=l.PageConfig.getBaseUrl(),s=()=>null!==o.currentWidget&&o.currentWidget===i.currentWidget,p=e=>{const{command:t,icon:l,buttonLabel:c,commandLabel:i,urlPrefix:b}=e;d.addCommand(t,{label:e=>e.noLabel?"":i,caption:i,icon:l,execute:()=>{const e=o.currentWidget;e&&window.open(`${b}${e.context.path}`)},isEnabled:s}),a&&a.addItem({command:t,category:"Other"}),n&&n.viewMenu.addGroup([{command:t}],1),o.widgetAdded.connect((async(e,o)=>{o.toolbar.insertBefore("kernelName",c,new r.CommandToolbarButton({commands:d,id:t,args:{noLabel:1}})),await o.context.ready,d.notifyCommandChanged()}))};p({command:"retrolab:open-classic",commandLabel:"Open in Classic Notebook",buttonLabel:"openClassic",icon:b.jupyterIcon,urlPrefix:`${m}tree/`}),t||p({command:"retrolab:open-retro",commandLabel:"Open in RetroLab",buttonLabel:"openRetro",icon:u.retroSunIcon,urlPrefix:`${m}retro/tree/`}),c||p({command:"retrolab:open-lab",commandLabel:"Open in JupyterLab",buttonLabel:"openLab",icon:b.jupyterFaviconIcon,urlPrefix:`${m}doc/tree/`})}},p=[{id:"@retrolab/lab-extension:launch-retrotree",autoStart:!0,requires:[i.ITranslator],optional:[c.IMainMenu,r.ICommandPalette],activate:(e,o,a,t)=>{const{commands:r}=e,c=o.load("jupyterlab"),d=c.__("Help");r.addCommand(n.launchRetroTree,{label:c.__("Launch RetroLab File Browser"),execute:()=>{window.open(l.PageConfig.getBaseUrl()+"retro/tree")}}),a&&a.helpMenu.addGroup([{command:n.launchRetroTree}],1),t&&t.addItem({command:n.launchRetroTree,category:d})}},s]}}]);