{"version":3,"file":"index-DEJNj_EH.js","sources":["../../Assets/Scripts/components/languagePicker/index.ts"],"sourcesContent":["export default () => {\n const languagePicker = document.querySelectorAll(\".js-language-picker\");\n const languagePickerToggle = document.querySelectorAll(\".js-language-picker-toggle\");\n const languagePickerList = document.querySelectorAll(\".js-language-picker-list\");\n\n if (!languagePicker) {\n return;\n }\n\n for (let i = 0; i < languagePickerToggle.length; i++) {\n languagePickerToggle[i].addEventListener(\"click\", () => {\n languagePickerToggle[i].classList.toggle(\"is-active\");\n languagePickerList[i].classList.toggle(\"is-open\");\n });\n\n document.addEventListener(\"click\", (event) => {\n if (!languagePickerToggle[i].contains(event.target as Node) && !languagePickerList[i].contains(event.target as Node)) {\n languagePickerToggle[i].classList.remove(\"is-active\");\n languagePickerList[i].classList.remove(\"is-open\");\n }\n });\n }\n}\n"],"names":["index","languagePicker","languagePickerToggle","languagePickerList","i","event"],"mappings":"AAAA,MAAAA,EAAe,IAAM,CACb,MAAAC,EAAiB,SAAS,iBAAiB,qBAAqB,EAChEC,EAAuB,SAAS,iBAAiB,4BAA4B,EAC7EC,EAAqB,SAAS,iBAAiB,0BAA0B,EAE/E,GAAKF,EAIL,QAASG,EAAI,EAAGA,EAAIF,EAAqB,OAAQE,IAC/CF,EAAqBE,CAAC,EAAE,iBAAiB,QAAS,IAAM,CACtDF,EAAqBE,CAAC,EAAE,UAAU,OAAO,WAAW,EACpDD,EAAmBC,CAAC,EAAE,UAAU,OAAO,SAAS,CAAA,CACjD,EAEQ,SAAA,iBAAiB,QAAUC,GAAU,CACxC,CAACH,EAAqBE,CAAC,EAAE,SAASC,EAAM,MAAc,GAAK,CAACF,EAAmBC,CAAC,EAAE,SAASC,EAAM,MAAc,IACjHH,EAAqBE,CAAC,EAAE,UAAU,OAAO,WAAW,EACpDD,EAAmBC,CAAC,EAAE,UAAU,OAAO,SAAS,EAClD,CACD,CAEL"}