{"version":3,"file":"js/02-molecules/menus/main-menu/main-menu.js","mappings":";;;;;AAAAA,MAAM,CAACC,SAAS,CAACC,QAAQ,CAAG,CAC1BC,MAAM,UAAAA,OAACC,CAAO,CAAE,IACR,CAAAC,CAAY,CAAGD,CAAO,CAACE,cAAc,CAAC,eAAe,CAAC,CACtDC,CAAI,CAAGH,CAAO,CAACE,cAAc,CAAC,UAAU,CAAC,CAC/C,GAAIC,CAAI,CAAE,CACR,GAAM,CAAAC,CAAU,CAAGD,CAAI,CAACE,sBAAsB,CAAC,YAAY,CAAC,CAG5DJ,CAAY,CAACK,gBAAgB,CAAC,OAAO,CAAE,SAACC,CAAC,CAAK,CAC5CN,CAAY,CAACO,SAAS,CAACC,MAAM,CAAC,qBAAqB,CAAC,CACpDN,CAAI,CAACK,SAAS,CAACC,MAAM,CAAC,gBAAgB,CAAC,CACvCF,CAAC,CAACG,cAAc,CAAC,CACnB,CAAC,CAAC,CAGFC,KAAK,CAACC,IAAI,CAACR,CAAU,CAAC,CAACS,OAAO,CAAC,SAACC,CAAI,CAAK,CACvCA,CAAI,CAACR,gBAAgB,CAAC,OAAO,CAAE,SAACC,CAAC,CAAK,IAC9B,CAAAQ,CAAQ,CAAGR,CAAC,CAACS,aAAa,CAC1BC,CAAO,CAAGF,CAAQ,CAACG,kBAAkB,CAE3CH,CAAQ,CAACP,SAAS,CAACC,MAAM,CAAC,kBAAkB,CAAC,CAC7CQ,CAAO,CAACT,SAAS,CAACC,MAAM,CAAC,qBAAqB,CAChD,CAAC,CACH,CAAC,CACH,CACF,CACF,CAAC,C","sources":["webpack://emulsify-drupal/./components/02-molecules/menus/main-menu/main-menu.js"],"sourcesContent":["Drupal.behaviors.mainMenu = {\n attach(context) {\n const toggleExpand = context.getElementById('toggle-expand');\n const menu = context.getElementById('main-nav');\n if (menu) {\n const expandMenu = menu.getElementsByClassName('expand-sub');\n\n // Mobile Menu Show/Hide.\n toggleExpand.addEventListener('click', (e) => {\n toggleExpand.classList.toggle('toggle-expand--open');\n menu.classList.toggle('main-nav--open');\n e.preventDefault();\n });\n\n // Expose mobile sub menu on click.\n Array.from(expandMenu).forEach((item) => {\n item.addEventListener('click', (e) => {\n const menuItem = e.currentTarget;\n const subMenu = menuItem.nextElementSibling;\n\n menuItem.classList.toggle('expand-sub--open');\n subMenu.classList.toggle('main-menu--sub-open');\n });\n });\n }\n },\n};\n"],"names":["Drupal","behaviors","mainMenu","attach","context","toggleExpand","getElementById","menu","expandMenu","getElementsByClassName","addEventListener","e","classList","toggle","preventDefault","Array","from","forEach","item","menuItem","currentTarget","subMenu","nextElementSibling"],"sourceRoot":""}