{"version":3,"sources":["webpack://@verndale/toolkit/./src/js/components/link-collapsible-content.js"],"names":[],"mappings":"mJAEA,MAAM,SAA+B,KAAU,CAC7C,eAAgB,CACd,KAAK,IAAM,CACT,mBAAoB,KAAK,GAAG,iBAAiB,wCAAwC,CACvF,CACF,CAEA,cAAe,CACb,KAAK,IAAI,mBAAmB,QAAQ,GAAQ,CAC1C,EAAG,iBAAiB,QAAS,KAAK,cAAc,KAAK,IAAI,CAAC,CAC5D,CAAC,CACH,CAEA,cAAc,EAAG,CACf,EAAG,cAAc,UAAU,OAAO,QAAQ,EAC1C,KAAM,GAAU,EAAG,cAAc,mBACjC,EAAY,UAAU,SAAS,MAAM,EACnC,EAAQ,UAAU,OAAO,MAAM,EAE/B,EAAQ,UAAU,IAAI,MAAM,CAEhC,CACF,CAEA,UAAe,C","file":"scripts/6822.864750f031bb3dbe7ce8.js","sourcesContent":["import { Component } from '@verndale/core';\n\nclass linkCollapsibleContent extends Component {\n setupDefaults() {\n this.dom = {\n $collapsibleAction: this.el.querySelectorAll('.link-collapsible-content .link--caret'),\n };\n }\n\n addListeners() {\n this.dom.$collapsibleAction.forEach((el) => {\n el.addEventListener('click', this.toggleContent.bind(this));\n });\n }\n\n toggleContent(el){\n el.currentTarget.classList.toggle('active');\n const content = el.currentTarget.nextElementSibling;\n if (content.classList.contains('show')) {\n content.classList.remove('show');\n } else {\n content.classList.add('show');\n }\n }\n}\n\nexport default linkCollapsibleContent;\n"],"sourceRoot":""}