{ "version": 3, "sources": ["../../../Vettvangur.Frontend/src/scripts/components/sideNavigation.ts"], "sourcesContent": ["const SideNavigation = {\r\n el: {\r\n sidebarItems: document.querySelectorAll('.side-navigation__item'),\r\n },\r\n\r\n init() {\r\n if (this.el.sidebarItems) {\r\n this.el.sidebarItems.forEach((item) => {\r\n const link = item.querySelector('.side-navigation__link')\r\n\r\n if (link) {\r\n link.addEventListener('click', (event) => {\r\n event.preventDefault()\r\n\r\n const href = link.getAttribute('href')\r\n\r\n setTimeout(() => {\r\n window.location.href = href\r\n }, 500)\r\n\r\n this.el.sidebarItems.forEach((item) => {\r\n item.classList.remove('side-navigation__item--active')\r\n })\r\n\r\n item.classList.add('side-navigation__item--active')\r\n })\r\n }\r\n })\r\n }\r\n },\r\n}\r\n\r\nexport default SideNavigation\r\n"], "mappings": "gCAAA,IAAMA,EAAiB,CACrB,GAAI,CACF,aAAc,SAAS,iBAAiB,wBAAwB,CAClE,EAEA,MAAO,CACD,KAAK,GAAG,cACV,KAAK,GAAG,aAAa,QAASC,GAAS,CACrC,IAAMC,EAAOD,EAAK,cAAc,wBAAwB,EAEpDC,GACFA,EAAK,iBAAiB,QAAUC,GAAU,CACxCA,EAAM,eAAe,EAErB,IAAMC,EAAOF,EAAK,aAAa,MAAM,EAErC,WAAW,IAAM,CACf,OAAO,SAAS,KAAOE,CACzB,EAAG,GAAG,EAEN,KAAK,GAAG,aAAa,QAASH,GAAS,CACrCA,EAAK,UAAU,OAAO,+BAA+B,CACvD,CAAC,EAEDA,EAAK,UAAU,IAAI,+BAA+B,CACpD,CAAC,CAEL,CAAC,CAEL,CACF,EAEOI,EAAQL", "names": ["SideNavigation", "item", "link", "event", "href", "sideNavigation_default"] }