{ "version": 3, "sources": ["../../../Vettvangur.Frontend/src/scripts/sections/header.ts"], "sourcesContent": ["const header = {\n el: {\n root: document.querySelectorAll('.header'),\n officeButton: document.querySelector('.header__office-button'),\n officeDrop: document.querySelector('.header__offices-drop'),\n navButtons: document.querySelectorAll('.main-navigation__button'),\n },\n init() {\n if (this.el.root) {\n this.offices()\n }\n },\n\n offices() {\n if (this.el.officeButton) {\n this.el.officeButton.addEventListener('click', () => {\n if (document.querySelector('.header__offices-drop').classList.contains('open')) {\n this.el.officeDrop.classList.remove('open')\n this.el.officeButton.setAttribute('aria-expanded', 'false')\n } else {\n this.el.officeDrop.classList.add('open')\n this.el.officeButton.setAttribute('aria-expanded', 'true')\n\n if (document.querySelector('.main-navigation__drop.open')) {\n document.querySelector('.main-navigation__drop.open').classList.remove('open')\n if (this.el.navButtons) {\n this.el.navButtons.forEach((button) => {\n button.setAttribute('aria-expanded', 'false')\n })\n }\n }\n }\n })\n }\n },\n}\n\nexport default header\n"], "mappings": "gCAAA,IAAMA,EAAS,CACb,GAAI,CACF,KAAM,SAAS,iBAA8B,SAAS,EACtD,aAAc,SAAS,cAAc,wBAAwB,EAC7D,WAAY,SAAS,cAAc,uBAAuB,EAC1D,WAAY,SAAS,iBAAoC,0BAA0B,CACrF,EACA,MAAO,CACD,KAAK,GAAG,MACV,KAAK,QAAQ,CAEjB,EAEA,SAAU,CACJ,KAAK,GAAG,cACV,KAAK,GAAG,aAAa,iBAAiB,QAAS,IAAM,CAC/C,SAAS,cAA2B,uBAAuB,EAAE,UAAU,SAAS,MAAM,GACxF,KAAK,GAAG,WAAW,UAAU,OAAO,MAAM,EAC1C,KAAK,GAAG,aAAa,aAAa,gBAAiB,OAAO,IAE1D,KAAK,GAAG,WAAW,UAAU,IAAI,MAAM,EACvC,KAAK,GAAG,aAAa,aAAa,gBAAiB,MAAM,EAErD,SAAS,cAA2B,6BAA6B,IACnE,SAAS,cAAc,6BAA6B,EAAE,UAAU,OAAO,MAAM,EACzE,KAAK,GAAG,YACV,KAAK,GAAG,WAAW,QAASC,GAAW,CACrCA,EAAO,aAAa,gBAAiB,OAAO,CAC9C,CAAC,GAIT,CAAC,CAEL,CACF,EAEOC,EAAQF", "names": ["header", "button", "header_default"] }