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KAAK,EAAE,IAAI,CAAC,SAAS,GAAG,SAAS,GAAG,QAAQ;AAC7C,aAAA,CAAC;AACJ,SAAC,CAAC;;IAGJ,MAAM,GAAA;AACJ,QAAA,OAAO,4DAAK,KAAK,EAAC,eAAe,EAAC,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,SAAS,GAAG,EAAiB,CAAC,GAAQ;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/ui/presto-youtube-subscribe-button/presto-youtube-subscribe-button.css?tag=presto-youtube-subscribe-button","src/components/ui/presto-youtube-subscribe-button/presto-youtube-subscribe-button.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'presto-youtube-subscribe-button',\n styleUrl: 'presto-youtube-subscribe-button.css',\n shadow: false,\n})\nexport class PrestoYoutubeSubscribeButton {\n private textInput?: HTMLElement;\n\n @Prop() channel: string;\n @Prop() layout: string = 'default';\n @Prop() showCount: boolean;\n\n waitForApi(callback) {\n var interval = setInterval(function () {\n if (window?.gapi?.ytsubscribe) {\n clearInterval(interval);\n callback();\n }\n }, 50);\n }\n\n componentDidLoad() {\n const po = document.createElement('script');\n po.type = 'text/javascript';\n po.async = false;\n po.src = 'https://apis.google.com/js/platform.js';\n const s = document.getElementsByTagName('script')[0];\n s && s.parentNode.insertBefore(po, s);\n\n this.waitForApi(() => {\n window.gapi.ytsubscribe.render(this.textInput, {\n channelId: this.channel,\n layout: this.layout,\n count: this.showCount ? 'default' : 'hidden',\n });\n });\n }\n\n render() {\n return <div class=\"g-ytsubscribe\" ref={el => (this.textInput = el as HTMLElement)}></div>;\n }\n}\n"],"version":3}