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BAAgBG,UAChDV,KAAKM,OAAOC,gBAAgBG,UAC1BiB,IAAgB3B,KAAKW,aACjBX,KAAKY,aACLZ,KAAKW,cAAgBX,KAAKS,iBAClC,M,6EAAC,CA5DS,E","sources":["webpack://@hero-digital/zoom/./src/components/modules/Columns/Column.js"],"sourcesContent":["class Column {\r\n constructor(el) {\r\n this.el = el\r\n this.maxCardCount = parseInt(this.el.getAttribute('data-cardcount')) || 0\r\n if (this.maxCardCount === 0) return\r\n this.columnElements = this.el.querySelectorAll('.wrapper > .column')\r\n this.domMap = {\r\n $showHideButton: this.el.querySelector('.fdn-showhide-button')\r\n }\r\n\r\n this.defaultButtonText = this.domMap.$showHideButton.innerText\r\n this.showHideText =\r\n this.domMap.$showHideButton.getAttribute('data-showmore-text') || ''\r\n this.showLessText =\r\n this.domMap.$showHideButton.getAttribute('data-showless-text') || ''\r\n this.initialize()\r\n }\r\n\r\n initialize() {\r\n if (this.maxCardCount >= 1) {\r\n this.initCards()\r\n this.domMap.$showHideButton.addEventListener(\r\n 'click',\r\n this.showHideCards.bind(this)\r\n )\r\n }\r\n }\r\n\r\n initCards() {\r\n for (let i = 0; i < this.columnElements.length; i++) {\r\n if (i < this.maxCardCount) {\r\n this.columnElements[i].removeAttribute('hidden')\r\n } else {\r\n this.columnElements[i].setAttribute('hidden', '')\r\n }\r\n }\r\n }\r\n\r\n showHideCards() {\r\n for (let i = 0; i < this.columnElements.length; i++) {\r\n const isHidden = this.columnElements[i].hasAttribute('hidden')\r\n if (i < this.maxCardCount) {\r\n this.columnElements[i].removeAttribute('hidden')\r\n } else {\r\n if (isHidden) {\r\n this.columnElements[i].removeAttribute('hidden')\r\n } else {\r\n this.columnElements[i].setAttribute('hidden', '')\r\n }\r\n }\r\n }\r\n this.toggleButtonText()\r\n }\r\n\r\n toggleButtonText() {\r\n const currentText = this.domMap.$showHideButton.innerText\r\n this.domMap.$showHideButton.innerText =\r\n currentText === this.showHideText\r\n ? this.showLessText\r\n : this.showHideText || this.defaultButtonText\r\n }\r\n}\r\n\r\nexport default Column"],"names":["Column","el","_classCallCheck","this","maxCardCount","parseInt","getAttribute","columnElements","querySelectorAll","domMap","$showHideButton","querySelector","defaultButtonText","innerText","showHideText","showLessText","initialize","key","value","initCards","addEventListener","showHideCards","bind","i","length","removeAttribute","setAttribute","isHidden","hasAttribute","toggleButtonText","currentText"],"sourceRoot":""}