{"version":3,"file":"submenu.component.bundle.js","sources":["../../../../Frontend/js/components/submenu.component.ts"],"sourcesContent":["export const setupSubMenu = (): void => {\r\n const subMenuCloseButtons = document.querySelectorAll(\"[data-submenu-close]\")\r\n subMenuCloseButtons.forEach((closeButton) => {\r\n closeButton?.addEventListener(\"click\", onClick)\r\n })\r\n}\r\n\r\nconst onClick = (): void => {\r\n document.querySelectorAll(\"[data-accordion]\").forEach((item) => {\r\n closeMenu(item)\r\n })\r\n}\r\n\r\nconst closeMenu = (element: HTMLElement): void => {\r\n element.removeAttribute(\"open\")\r\n element.setAttribute(\"aria-expanded\", \"false\")\r\n element.classList.remove(\"accordion-active\")\r\n element.querySelectorAll(\"[data-accordion-interactive]\").forEach((subElement) => {\r\n subElement.tabIndex = -1\r\n })\r\n}"],"names":["setupSubMenu","closeButton","onClick","item","closeMenu","element","subElement"],"mappings":"AAAO,MAAMA,EAAe,IAAY,CACV,SAAS,iBAA8B,sBAAsB,EACrE,QAASC,GAAgB,CAC9BA,GAAA,iBAAiB,QAASC,CAAO,CAAA,CAC/C,CACH,EAEMA,EAAU,IAAY,CAC1B,SAAS,iBAA8B,kBAAkB,EAAE,QAASC,GAAS,CAC3EC,EAAUD,CAAI,CAAA,CACf,CACH,EAEMC,EAAaC,GAA+B,CAChDA,EAAQ,gBAAgB,MAAM,EACtBA,EAAA,aAAa,gBAAiB,OAAO,EACrCA,EAAA,UAAU,OAAO,kBAAkB,EAC3CA,EAAQ,iBAA8B,8BAA8B,EAAE,QAASC,GAAe,CAC5FA,EAAW,SAAW,EAAA,CACvB,CACH"}