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