"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:()=>s});var n,a=t(872),r=t(678),l=t(281),c=t(598),d=t(998),b=t(144),u=t(496),i=t(669);!function(e){e.launchNotebookTree="jupyter-notebook:launch-tree",e.openNotebook="jupyter-notebook:open-notebook",e.openLab="jupyter-notebook:open-lab"}(n||(n={}));const m={id:"@jupyter-notebook/lab-extension:interface-switcher",autoStart:!0,requires:[d.ITranslator,c.INotebookTracker],optional:[r.ICommandPalette,u.INotebookShell,a.ILabShell,r.IToolbarWidgetRegistry],activate:(e,o,t,a,r,c,d)=>{const{commands:u,shell:m}=e,s=l.PageConfig.getBaseUrl(),p=o.load("notebook"),k={overflowMenuOptions:{isVisible:!1}},h=new b.MenuBar(k),_=new b.Menu({commands:u});_.title.label=p.__("Interface"),_.title.icon=i.caretDownIcon,h.addMenu(_);const w=()=>null!==t.currentWidget&&t.currentWidget===m.currentWidget,f=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:w}),a&&a.addItem({command:o,category:"Other"}),_.addItem({command:o})};r||f({command:n.openNotebook,commandLabel:p.__("Open With %1","Jupyter Notebook"),buttonLabel:"openNotebook",urlPrefix:`${s}tree/`}),c||f({command:n.openLab,commandLabel:p.__("Open With %1","JupyterLab"),buttonLabel:"openLab",urlPrefix:`${s}doc/tree/`}),d&&d.addFactory("Notebook","interfaceSwitcher",(e=>{const o=new b.MenuBar(k);return o.addMenu(_),o.addClass("jp-InterfaceSwitcher"),o}))}},s=[{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})}},m]}}]);