"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),o=require("lucide-react"),t=require("../../styles/ScopeTree.module.css.js"),s=require("./TreeMenu.js"),r=require("./HighlightedText.js");exports.TreeNodeHeader=function(a){var i=a.name,d=a.isExpanded,c=a.isSelected,l=a.isAncestor,u=a.isExpandable,h=void 0===u||u,x=a.onToggleExpand,f=a.onClick,g=a.menuOptions,p=a.searchQuery,j=a.childrenCount,v=a.nodeType,_=c?t.default.nodeHeaderSelected:l?t.default.nodeHeaderAncestor:"",m=c||l;return n.jsxs("div",e.__assign({className:"".concat(t.default.nodeHeader," ").concat(_),onClick:f,role:"button",tabIndex:0,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),f())}},{children:[n.jsx("div",e.__assign({className:"".concat(t.default.chevron," ").concat(d?t.default.chevronExpanded:""," ").concat(h?"":t.default.chevronHidden),onClick:function(e){h&&x(e)},role:"button",tabIndex:h?0:-1},{children:n.jsx(o.ChevronDown,{size:16,strokeWidth:m?2.5:2,color:m?"#2563EB":"#64748B"})})),n.jsx("div",e.__assign({className:t.default.folderIcon},{children:"station"===(null==v?void 0:v.toLocaleLowerCase())?n.jsx(o.RadioTower,{size:18,strokeWidth:m?2.5:2,color:m?"currentColor":"#64748B"}):n.jsx(o.FolderOpen,{size:18,strokeWidth:m?2.5:2,color:m?"currentColor":"#64748B"})})),n.jsx("span",e.__assign({className:t.default.nodeName},{children:n.jsx(r.HighlightedText,{text:i,highlight:p})})),void 0!==j&&j>0&&n.jsx("span",e.__assign({className:"".concat(t.default.badge," ").concat(c?t.default.badgeActive:"")},{children:j})),g&&g.length>0&&n.jsx("div",e.__assign({onClick:function(e){return e.stopPropagation()}},{children:n.jsx(s.TreeMenu,{options:g,buttonClassName:t.default.optionsButton,iconSize:16})}))]}))};
//# sourceMappingURL=TreeNodeHeader.js.map
