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AAA,eAAe,CAACQ,SAAhB,CAA0BG,GAA1B,CAA8B,WAA9B;;AACA,UAAIR,QAAJ,EAAc;AACVA,QAAAA,QAAQ,CAACK,SAAT,CAAmBE,MAAnB,CAA0B,WAA1B;AACH;;AACD,UAAIN,SAAJ,EAAe;AACXA,QAAAA,SAAS,CAACI,SAAV,CAAoBG,GAApB,CAAwB,WAAxB;AACH;AACJ;AACJ,GAvBD;AAwBH,CArCD","sources":["webpack://selectrucks/./scripts/feature/slideOpen.js"],"sourcesContent":["export default async element => { // [slide-open]\n \n const alias = element.getAttribute('slide-open');\n if (!alias)\n console.warn('An alias needs to be provided for [slide-open]');\n\n const hiddenContainer = document.getElementById(`hiddenCopy-${alias}`);\n if (!hiddenContainer)\n console.warn(`A hidden element with the id of [hiddenCopy-${alias}] needs to be provided`);\n\n const openIcon = document.getElementById(`toggleIcon-${alias}`);\n const closeIcon = document.getElementById(`toggleCloseIcon-${alias}`);\n\n element.addEventListener('click', (event) => {\n event.preventDefault();\n \n if (hiddenContainer.classList.contains(\"tw-hidden\")) {\n hiddenContainer.classList.remove(\"tw-hidden\");\n hiddenContainer.classList.add(\"tw-block\");\n if (openIcon) {\n openIcon.classList.add(\"tw-hidden\");\n }\n if (closeIcon) {\n closeIcon.classList.remove(\"tw-hidden\");\n }\n }\n else if (hiddenContainer.classList.contains(\"tw-block\")) {\n hiddenContainer.classList.remove(\"tw-block\");\n hiddenContainer.classList.add(\"tw-hidden\");\n if (openIcon) {\n openIcon.classList.remove(\"tw-hidden\");\n }\n if (closeIcon) {\n closeIcon.classList.add(\"tw-hidden\");\n }\n }\n });\n};"],"names":["element","alias","getAttribute","console","warn","hiddenContainer","document","getElementById","openIcon","closeIcon","addEventListener","event","preventDefault","classList","contains","remove","add"],"sourceRoot":""}