{"version":3,"file":"default/js/experience/layouts/accordionContent.js","mappings":";;;;;AAAA;;AAEa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL,CAAC","sources":["webpack://sfra-startup-kit/./cartridges/app_ahumada/cartridge/client/default/js/experience/layouts/accordionContent.js"],"sourcesContent":["/* eslint-env jquery */\n\n\"use strict\";\n\nfunction initAccordionInstance($root) {\n    const isSingleExpanded = $root.is(\".accordion-content--single-expanded\");\n    const $tabsList = $root.find(\".accordion-content-tab\");\n\n    $root.on(\"click\", \".accordion-content-tab-title, .accordion-collapse-icon\", function () {\n        const $this = $(this);\n        const $currentTab = $this.closest(\".accordion-content-tab\");\n\n        if ($currentTab.hasClass(\"disabled\")) {\n            return;\n        }\n\n        if (isSingleExpanded) {\n            const wasCurrentTabExpanded = $currentTab.is(\".accordion-content-tab--expanded\");\n\n            $tabsList.removeClass(\"accordion-content-tab--expanded\");\n            if (!wasCurrentTabExpanded) {\n                $currentTab.addClass(\"accordion-content-tab--expanded\");\n            }\n        } else {\n            $currentTab.toggleClass(\"accordion-content-tab--expanded\");\n        }\n    });\n}\n\n(function () {\n    // accordion instances list\n    const $accordions = $(\".accordion-content\");\n\n    $accordions.each(function () {\n        initAccordionInstance($(this));\n    });\n})();\n"],"names":[],"sourceRoot":""}