import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Resizable}from"re-resizable";import{SortableTree}from"../Tree/SortableTree.js";import"./Navigator.scss";export default function Navigator({modules:e,currModId:t,defaultWidth:i,width:r,onResize:a,selectModule:o,deleteModule:s,reorderModules:l,toggleNavigator:d}){return _jsx(Resizable,{defaultSize:{width:i??250,height:"100vh"},onResize:a,size:{width:r,height:"100vh"},minWidth:150,maxWidth:1e3,style:{position:"fixed",top:0,right:0,zIndex:1001},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},children:_jsxs("div",{className:"navigator",children:[_jsx("div",{className:"navigator__close-btn",onClick:d,children:_jsx("i",{className:"fa-solid fa-sharp fa-times"})}),_jsx("div",{className:"navigator__header",children:"Navigator"}),_jsx("div",{className:"navigator__tree-container",children:_jsx("ul",{className:"navigator__tree-container-inner",children:_jsx(SortableTree,{treeItems:e,currItemId:t,collapsible:!0,indicator:!0,removable:!0,onSelect:o,onDelete:s,reorderModules:l})})})]})})}