{"version":3,"sources":["webpack:///./src/components/pmicom/components/faq-block/controller.js"],"names":["trackGtm","trackGtm4","require","module","exports","init","links","root","querySelectorAll","widgetName","getAttribute","widgetTitle","secondaryWidgetTitle","parentTitle","closest","querySelector","innerText","backupTitle","forEach","element","addEventListener","eventCategory","eventAction","previousElementSibling","eventLabel","href","event","widget_name","widget_title","link_text","innerHTML","link_url","button_type"],"mappings":";;;;;;;;;AAAA,MAAM;EAAEA,QAAF;EAAYC;AAAZ,IAA0BC,mBAAO,CAAC,uDAAD,CAAvC;;AAEAC,MAAM,CAACC,OAAP,GAAiB;EAChBC,IAAI,GAAG;IAAA;;IACN,MAAMC,KAAK,GAAG,KAAKC,IAAL,CAAUC,gBAAV,CAA2B,eAA3B,CAAd;IACA,MAAMC,UAAU,GAAG,KAAKF,IAAL,CAAUG,YAAV,CAAuB,aAAvB,CAAnB;IACA,MAAMC,WAAW,GAAG,KAAKJ,IAAL,CAAUG,YAAV,CAAuB,mBAAvB,CAApB;IACA,MAAME,oBAAoB,GAAG,KAAKL,IAAL,CAAUG,YAAV,CAAuB,sBAAvB,CAA7B;IACA,MAAMG,WAAW,yBAAG,KAAKN,IAAL,CAClBO,OADkB,CACV,qBADU,CAAH,uDAAG,mBAEjBC,aAFiB,CAEH,4BAFG,EAE2BC,SAF/C;IAIA,MAAMC,WAAW,GAAGL,oBAAoB,GACrCA,oBADqC,GAErCC,WAAW,GACXA,WADW,GAEX,yBAJH;IAMAP,KAAK,CAACY,OAAN,CAAcC,OAAO,IAAI;MACxBA,OAAO,CAACC,gBAAR,CAAyB,OAAzB,EAAkC,MAAM;QACvCpB,QAAQ,CAAC;UACRqB,aAAa,EAAE,KADP;UAERC,WAAW,EAAEH,OAAO,CAACI,sBAAR,CAA+BP,SAFpC;UAGRQ,UAAU,EAAEL,OAAO,CAACM;QAHZ,CAAD,CAAR;QAKAxB,SAAS,CAAC;UACTyB,KAAK,EAAE,iBADE;UAETC,WAAW,EAAElB,UAFJ;UAGTmB,YAAY,EAAEjB,WAAW,GAAGA,WAAH,GAAiBM,WAHjC;UAITY,SAAS,EAAEV,OAAO,CAACW,SAJV;UAKTC,QAAQ,EAAEZ,OAAO,CAACM,IALT;UAMTO,WAAW,EAAE;QANJ,CAAD,CAAT;MAQA,CAdD;IAeA,CAhBD;EAiBA;;AAjCe,CAAjB,C","file":"components--faq-block299af21d05a0f2fe6759.js","sourcesContent":["const { trackGtm, trackGtm4 } = require('../../../../js/functions');\n\nmodule.exports = {\n\tinit() {\n\t\tconst links = this.root.querySelectorAll('.arrowed-link');\n\t\tconst widgetName = this.root.getAttribute('data-parent');\n\t\tconst widgetTitle = this.root.getAttribute('data-parent-title');\n\t\tconst secondaryWidgetTitle = this.root.getAttribute('data-secondary-title');\n\t\tconst parentTitle = this.root\n\t\t\t.closest('.carousel-highlight')\n\t\t\t?.querySelector('.carousel-highlight--title').innerText;\n\n\t\tconst backupTitle = secondaryWidgetTitle\n\t\t\t? secondaryWidgetTitle\n\t\t\t: parentTitle\n\t\t\t? parentTitle\n\t\t\t: 'No title: Title not set';\n\n\t\tlinks.forEach(element => {\n\t\t\telement.addEventListener('click', () => {\n\t\t\t\ttrackGtm({\n\t\t\t\t\teventCategory: 'cta',\n\t\t\t\t\teventAction: element.previousElementSibling.innerText,\n\t\t\t\t\teventLabel: element.href,\n\t\t\t\t});\n\t\t\t\ttrackGtm4({\n\t\t\t\t\tevent: 'GA4_event_c_cta',\n\t\t\t\t\twidget_name: widgetName,\n\t\t\t\t\twidget_title: widgetTitle ? widgetTitle : backupTitle,\n\t\t\t\t\tlink_text: element.innerHTML,\n\t\t\t\t\tlink_url: element.href,\n\t\t\t\t\tbutton_type: '',\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t},\n};\n"],"sourceRoot":""}