{"version":3,"sources":["webpack:///./assets/src/app/components/share-button/ShareButton.js"],"names":["Component","ShareButton","key","value","_this","this","$element","on","event","preventDefault","copyToClipboard","_this2","navigator","clipboard","writeText","window","location","href","children","attr","setTimeout"],"mappings":"u1BAGCA,YAAU,0BAA0B,GAAC,cAAAC,I,KAAA,gBAAAA,G,wDAAA,Q,EAAAA,G,EAAA,EAAAC,IAAA,OAAAC,MAErC,WAAO,IAAAC,EAAA,KACNC,KAAKC,SAASC,GAAG,QAAS,SAACC,GAC1BA,EAAMC,eAAe,EACrBL,EAAKM,gBAAgB,CACtB,CAAC,CACF,CAAC,GAAAR,IAAA,kBAAAC,MAED,WAAkB,IAAAQ,EAAA,KACjBC,UAAUC,UAAUC,UAAUC,OAAOC,SAASC,IAAI,EAElDZ,KAAKC,SAASY,SAAS,YAAY,EAAEC,KAAK,QAAS,eAAe,EAClEd,KAAKC,SAASY,SAAS,aAAa,EAAEC,KAAK,QAAS,gBAAgB,EAEpEC,WAAW,WACVT,EAAKL,SAASY,SAAS,YAAY,EAAEC,KAAK,QAAS,gBAAgB,EACnER,EAAKL,SAASY,SAAS,aAAa,EAAEC,KAAK,QAAS,eAAe,CACpE,EAAG,GAAG,CACP,CAAC,K,yFAAA,K","file":"ShareButton.49aa0f7e66a75f2ecb9e.js","sourcesContent":["import './share-button.scss';\nimport {Component} from \"strudel\";\n\n@Component('[data-cp=\"share-button\"]')\nclass ShareButton {\n\tinit() {\n\t\tthis.$element.on('click', (event) => {\n\t\t\tevent.preventDefault();\n\t\t\tthis.copyToClipboard();\n\t\t});\n\t}\n\n\tcopyToClipboard() {\n\t\tnavigator.clipboard.writeText(window.location.href);\n\n\t\tthis.$element.children('#icon-copy').attr('style', 'display:none;')\n\t\tthis.$element.children('#icon-check').attr('style', 'display:block;')\n\n\t\tsetTimeout(() => {\n\t\t\tthis.$element.children('#icon-copy').attr('style', 'display:block;')\n\t\t\tthis.$element.children('#icon-check').attr('style', 'display:none;')\n\t\t}, 900);\n\t}\n}\n"],"sourceRoot":""}