{"version":3,"sources":["webpack:///./src/js/modules/tabbed-content.js"],"names":["Module","TabbedContent","identifier","this","el","dataset","dom","$tabs","_$$","$panels","$dropdown","_$","isVertical","forEach","tab","_on","onClick","bind","onKeyDown","onKeyUp","onActivatetab","onReset","handleElementClick","e","target","classList","toString","includes","window","dispatchEvent","Event","super"],"mappings":"2FAAA,oBAEA,MAAMA,UAAeC,gBACnB,gBACE,MAAMC,EAAaC,KAAKC,GAAGC,QAAQH,WACnCC,KAAKG,IAAM,CACTC,MAAOJ,KAAKC,GAAGI,IAAI,qBAAqBN,mBACxCO,QAASN,KAAKC,GAAGI,IAAI,qBAAqBN,wBAC1CQ,UAAWP,KAAKC,GAAGO,GAAG,8BAExBR,KAAKS,WAA4C,SAA/BT,KAAKC,GAAGC,QAAQO,WAGpC,eACET,KAAKG,IAAIC,MAAMM,QAAQC,GAAOA,EAAIC,IAAI,QAASZ,KAAKa,QAAQC,KAAKd,QACjEA,KAAKG,IAAIC,MAAMM,QAAQC,GAAOA,EAAIC,IAAI,UAAWZ,KAAKe,UAAUD,KAAKd,QACrEA,KAAKG,IAAIC,MAAMM,QAAQC,GAAOA,EAAIC,IAAI,QAASZ,KAAKgB,QAAQF,KAAKd,QACjEA,KAAKC,GAAGW,IAAI,cAAeZ,KAAKiB,cAAcH,KAAKd,OACnDA,KAAKC,GAAGW,IAAI,QAASZ,KAAKkB,QAAQJ,KAAKd,OACvCA,KAAKC,GAAGW,IAAI,QAASZ,KAAKmB,mBAAmBL,KAAKd,OAGpD,mBAAmBoB,IACGA,EAAEC,OAAOC,UAAUC,WAAWC,SAAS,4BAE3DC,OAAOC,cAAc,IAAIC,MAAM,eAGjC,YAAY1B,GACV2B,MAAM3B,IAIKJ","file":"65.a3cc6b5839af271e06a2.js?v=0c1a0bf2b5a63076aced","sourcesContent":["import { TabbedContent } from '@verndale/front-end-components';\n\nclass Module extends TabbedContent {\n setupDefaults() {\n const identifier = this.el.dataset.identifier;\n this.dom = {\n $tabs: this.el._$$(`[data-identifier=\"${identifier}\"][role=\"tab\"]`),\n $panels: this.el._$$(`[data-identifier=\"${identifier}\"][role=\"tabpanel\"]`),\n $dropdown: this.el._$('.tabbed-content__dropdown')\n };\n this.isVertical = this.el.dataset.isVertical === 'true';\n }\n\n addListeners() {\n this.dom.$tabs.forEach(tab => tab._on('click', this.onClick.bind(this)));\n this.dom.$tabs.forEach(tab => tab._on('keydown', this.onKeyDown.bind(this)));\n this.dom.$tabs.forEach(tab => tab._on('keyup', this.onKeyUp.bind(this)));\n this.el._on('activatetab', this.onActivatetab.bind(this));\n this.el._on('reset', this.onReset.bind(this));\n this.el._on('click', this.handleElementClick.bind(this));\n }\n\n handleElementClick(e) {\n const isTabButton = e.target.classList.toString().includes('tabbed-content__tab btn');\n if (!isTabButton) return;\n window.dispatchEvent(new Event('clickontab'));\n }\n\n constructor(el) {\n super(el);\n }\n}\n\nexport default Module;\n"],"sourceRoot":""}