Liferay.Loader.define("asset-taglib@8.0.17/asset_categories_navigation/js/AssetCategoriesNavigationTreeView",["module","exports","require","@frontend-taglib-clay$clayui/core","@frontend-taglib-clay$clayui/icon","frontend-js-web","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a("@frontend-taglib-clay$clayui/core"),l=o(a("@frontend-taglib-clay$clayui/icon")),r=a("frontend-js-web"),i=o(a("liferay!frontend-js-react-web$react"));function o(e){return e&&e.__esModule?e:{default:e}}var d=({selectedCategoryId:e,vocabularies:t})=>{const a=t=>{e!==t.id&&(0,r.navigate)(t.url)},o=(e,t,n)=>{e.preventDefault(),t.disabled?n.toggle(t.id):a(t)},d=(e,t)=>{" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),a(t))};return i.default.createElement(n.TreeView,{defaultItems:t,defaultSelectedKeys:new Set(e?[e]:[]),showExpanderOnHover:!1},((e,t)=>i.default.createElement(n.TreeView.Item,null,i.default.createElement(n.TreeView.ItemStack,{onClick:a=>o(a,e,t),onKeyDownCapture:t=>{" "===t.key&&e.disabled&&t.stopPropagation()},onKeyUp:t=>d(t,e)},i.default.createElement(l.default,{symbol:e.icon}),e.name),i.default.createElement(n.TreeView.Group,{items:e.children},(e=>i.default.createElement(n.TreeView.Item,{onClick:t=>o(t,e),onKeyUp:t=>d(t,e)},i.default.createElement(l.default,{symbol:e.icon}),e.name))))))};t.default=d}}));
//# sourceMappingURL=AssetCategoriesNavigationTreeView.js.map