"use strict";(self.webpackChunk_jupyter_notebook_lab_extension=self.webpackChunk_jupyter_notebook_lab_extension||[]).push([[568],{568:(e,o,t)=>{t.r(o),t.d(o,{default:()=>m});var n,a=t(533),r=t(413),l=t(286),c=t(673),d=t(590),b=t(95),u=t(497);!function(e){e.launchNotebookTree="jupyter-notebook:launch-tree",e.openNotebook="jupyter-notebook:open-notebook",e.openLab="jupyter-notebook:open-lab"}(n||(n={}));const i={id:"@jupyter-notebook/lab-extension:interface-switcher",autoStart:!0,requires:[d.ITranslator],optional:[c.INotebookTracker,r.ICommandPalette,u.INotebookShell,a.ILabShell,r.IToolbarWidgetRegistry],activate:(e,o,t,a,r,c,d)=>{if(!t)return;const{commands:u,shell:i}=e,m=l.PageConfig.getBaseUrl(),s=o.load("notebook"),p=new b.MenuBar,k=new b.Menu({commands:u});k.title.label=s.__("Interface"),p.addMenu(k);const h=()=>null!==t.currentWidget&&t.currentWidget===i.currentWidget,_=e=>{const{command:o,commandLabel:n,urlPrefix:r}=e;u.addCommand(o,{label:e=>e.noLabel?"":n,caption:n,execute:()=>{const e=t.currentWidget;e&&window.open(`${r}${e.context.path}`)},isEnabled:h}),a&&a.addItem({command:o,category:"Other"}),k.addItem({command:o})};r||_({command:n.openNotebook,commandLabel:s.__("Open With %1","Jupyter Notebook"),buttonLabel:"openNotebook",urlPrefix:`${m}tree/`}),c||_({command:n.openLab,commandLabel:s.__("Open With %1","JupyterLab"),buttonLabel:"openLab",urlPrefix:`${m}doc/tree/`}),d&&d.addFactory("Notebook","interfaceSwitcher",(e=>{const o=new b.MenuBar;return o.addMenu(k),o.addClass("jp-InterfaceSwitcher"),o}))}},m=[{id:"@jupyter-notebook/lab-extension:launch-tree",autoStart:!0,requires:[d.ITranslator],optional:[r.ICommandPalette],activate:(e,o,t)=>{const{commands:a}=e,r=o.load("notebook"),c=r.__("Help");a.addCommand(n.launchNotebookTree,{label:r.__("Launch Jupyter Notebook File Browser"),execute:()=>{window.open(l.PageConfig.getBaseUrl()+"tree")}}),t&&t.addItem({command:n.launchNotebookTree,category:c})}},i]}}]);