{"version":3,"file":"menu-js.8c00ba20.js","mappings":"iUAOAA,EAAAA,GAAAA,IAAW,CAACC,EAAAA,K,IAESC,EAAAA,WACpB,WAAYC,I,4FAAQ,SACnBC,KAAKC,GAAKF,EAAOE,IAAMC,SAASC,iBAAiB,YACjDH,KAAKI,cAAgBJ,KAAKC,GAAGI,cAAc,yBAC3CL,KAAKM,gBAAkBN,KAAKC,GAAGE,iBAAiB,wBAChDH,KAAKO,OAASL,SAASG,cAAc,iBACrCL,KAAKQ,O,2CAGN,WACCR,KAAKS,eAEDT,KAAKO,QACRP,KAAKU,c,0BAIP,WACCV,KAAKI,cAAcO,iBAAiB,QAASX,KAAKY,qB,+BAGnD,SAAkBC,GACjB,IAAMC,EAAWD,EAAEE,cAAcC,WAC3BC,EAAOH,EAAST,cAAc,+BAC9Ba,EAAeJ,EAAST,cAAc,0BACtCc,EAAcL,EAAST,cAAc,yBACrCe,EAAQN,EAAST,cAAc,yBAC/BgB,EAAY,SACDJ,EAAKK,UAAUC,SAASF,IAGxCJ,EAAKK,UAAUE,OAAOH,GACtBH,EAAaI,UAAUG,IAAIJ,GAC3BF,EAAYG,UAAUE,OAAOH,GAC7BD,EAAME,UAAUG,IAAIJ,KAEpBJ,EAAKK,UAAUG,IAAIJ,GACnBH,EAAaI,UAAUE,OAAOH,GAC9BF,EAAYG,UAAUG,IAAIJ,GAC1BD,EAAME,UAAUE,OAAOH,M,uBAIzB,WACC,IAAIzB,EAAAA,GAAOI,KAAKO,OAAQ,CACvBmB,cAAe,OACfC,eAAgB,EAChBC,aAAc,EACdC,OAAQ,OACRC,WAAY,CACXC,OAAQ,4BACRC,OAAQ,oC,6BAnDSlC","sources":["webpack://ucn/./src/components/menu/menu.js"],"sourcesContent":["import Swiper, { Navigation } from \"swiper\";\n\n// import Swiper and modules styles\nimport \"swiper/css\";\nimport \"swiper/css/navigation\";\n\n// configure Swiper to use modules\nSwiper.use([Navigation]);\n\nexport default class Menu {\n\tconstructor(config) {\n\t\tthis.el = config.el || document.querySelectorAll(\".menu-js\");\n\t\tthis.dropdownTitle = this.el.querySelector(\".menu__dropdown-title\");\n\t\tthis.dropdownOptions = this.el.querySelectorAll(\".menu__dropdown-item\");\n\t\tthis.swiper = document.querySelector(\".menu__swiper\");\n\t\tthis.init();\n\t}\n\n\tinit() {\n\t\tthis.attachEvents();\n\n\t\tif (this.swiper) {\n\t\t\tthis.setSwiper();\n\t\t}\n\t}\n\n\tattachEvents() {\n\t\tthis.dropdownTitle.addEventListener(\"click\", this.toggleMenuDisplay);\n\t}\n\n\ttoggleMenuDisplay(e) {\n\t\tconst dropdown = e.currentTarget.parentNode;\n\t\tconst menu = dropdown.querySelector(\".menu__collection--dropdown\");\n\t\tconst burgerButton = dropdown.querySelector(\".menu__dropdown-burger\");\n\t\tconst closeButton = dropdown.querySelector(\".menu__dropdown-close\");\n\t\tconst arrow = dropdown.querySelector(\".menu__dropdown-arrow\");\n\t\tconst className = \"hidden\";\n\t\tconst isHidden = menu.classList.contains(className);\n\n\t\tif (isHidden) {\n\t\t\tmenu.classList.remove(className);\n\t\t\tburgerButton.classList.add(className);\n\t\t\tcloseButton.classList.remove(className);\n\t\t\tarrow.classList.add(className);\n\t\t} else {\n\t\t\tmenu.classList.add(className);\n\t\t\tburgerButton.classList.remove(className);\n\t\t\tcloseButton.classList.add(className);\n\t\t\tarrow.classList.remove(className);\n\t\t}\n\t}\n\n\tsetSwiper() {\n\t\tnew Swiper(this.swiper, {\n\t\t\tslidesPerView: \"auto\",\n\t\t\tslidesPerGroup: 4,\n\t\t\tspaceBetween: 0,\n\t\t\teffect: \"fade\",\n\t\t\tnavigation: {\n\t\t\t\tnextEl: \".menu__swiper-button-next\",\n\t\t\t\tprevEl: \".menu__swiper-button-prev\",\n\t\t\t},\n\t\t});\n\t}\n}\n"],"names":["Swiper","Navigation","Menu","config","this","el","document","querySelectorAll","dropdownTitle","querySelector","dropdownOptions","swiper","init","attachEvents","setSwiper","addEventListener","toggleMenuDisplay","e","dropdown","currentTarget","parentNode","menu","burgerButton","closeButton","arrow","className","classList","contains","remove","add","slidesPerView","slidesPerGroup","spaceBetween","effect","navigation","nextEl","prevEl"],"sourceRoot":""}