import{__assign as e}from"tslib";import{jsxs as o,Fragment as t,jsx as a}from"react/jsx-runtime";import{useState as n}from"react";import{Plus as r}from"lucide-react";import c from"./styles/Sidebar.module.css.js";import i from"./components/SidebarSearch.js";import{TreeSidebar as s}from"./components/ScopeTree/TreeSidebar.js";import{dt as d}from"./store/useLMSConfigStore.js";import{MIDDLE_DRAWER_DT_PATH as l}from"./constants.js";import{useLearningTemplateStore as m}from"./store/useLearningTemplateStore.js";var p=function(p){var S=p.scopeTreeData,h=p.selectedRuleSetId,C=p.onAddChild,f=p.onRenameChild,u=p.onDeleteChild,v=p.canDeleteScope,b=p.canEditScope,g=p.canCreateScope,j=p.onSectionSelect,T=p.activeSectionId,y=p.onOnboardStation,D=p.sectionsConfig,N=p.nodeTypesConfig,I=p.searchPlaceholder,R=void 0===I?d("".concat(l,".treeMenu.search"),"Search for Scopes.."):I,k=n(""),x=k[0],A=k[1],B=n(0),E=B[0],L=B[1],M=m.getState().backwardCompatibility;return o("div",e({className:c.sidebar},{children:[o(t,{children:[a(i,{value:x,onChange:A,placeholder:R,searchCount:E}),a("div",{className:c.divider}),a("div",e({className:c.content},{children:S&&a(s,{data:S.data,onAddChild:C,onRenameChild:f,onDeleteChild:u,canDeleteScope:v,canEditScope:b,canCreateScope:g,onSectionSelect:j,selectedRuleSetId:h,activeSectionId:T,searchQuery:x,onSearchCountChange:L,sectionsConfig:D,nodeTypesConfig:N})}))]}),y&&M&&a("div",e({className:c.createButtonContainer},{children:o("button",e({className:c.createButton,onClick:y},{children:[a(r,{size:16}),"Onboard a station"]}))}))]}))};export{p as default};
//# sourceMappingURL=Sidebar.js.map
