Liferay.Loader.define("dynamic-data-mapping-form-web@4.0.105/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||"SPAN"===r.target.tagName){r.preventDefault();const n="button"===r.target.type?r.target:r.target.parentElement,o=Number(n.parentElement.dataset.navItemIndex),s=e[o];document.querySelector(".forms-navigation-bar li > .active").classList.remove("active"),n.classList.add("active");(s===a.pathname?t.replace:t.push)(s)}}),[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