Liferay.Loader.define("dynamic-data-mapping-form-web@4.0.84/admin/js/components/NavigationBar.es",["module","exports","require","@liferay/frontend-js-react-web","liferay!frontend-js-react-web$react","../hooks/useBack.es"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationBar=function({history:t,location:a}){(0,o.useBack)();const i=(0,n.useCallback)((r=>{if("button"===r.target.type){r.preventDefault();const n=Number(r.target.parentElement.dataset.navItemIndex),o=e[n];document.querySelector(".forms-navigation-bar li > .active").classList.remove("active"),r.target.classList.add("active");(o===a.pathname?t.replace:t.push)(o)}}),[t,a.pathname]);return(0,r.useEventListener)("click",i,!0,document.body.querySelector(".forms-navigation-bar")),(0,n.useLayoutEffect)((()=>{const e=s[a.pathname];document.querySelector(".forms-navigation-bar li[data-nav-item-index='".concat(e,"'] > button")).classList.add("active")}),[]),null};var r=a("@liferay/frontend-js-react-web"),n=a("liferay!frontend-js-react-web$react"),o=a("../hooks/useBack.es");const e={0:"/",1:"/rules",2:"/report"},s={"/":0,"/report":2,"/rules":1}}}));
//# sourceMappingURL=NavigationBar.es.js.map