"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-1d07a497.js"),prestoActionBarUiCss=":host{display:block;overflow:hidden}.bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;background:var(--presto-action-bar-background, #1d1d1d);color:#fff;padding:0 var(--presto-action-bar-padding, 6px);line-height:1em;font-size:16px;margin-top:-100%;transition:margin var(--presto-action-bar-animation-speed, 0.5s) ease-in-out;transform:translate3d(0);border-radius:0px 0px var(--presto-player-border-radius) var(--presto-player-border-radius)}.bar.bar--open{margin-top:0}.bar__button{margin:var(--presto-action-bar-padding, 6px);display:flex;align-items:center}.bar__content{margin:var(--presto-action-bar-padding, 6px);width:100%;text-align:center}@media screen and (min-width: 480px){.bar__content{width:auto}}",PrestoActionBarUi=class{constructor(t){index.registerInstance(this,t),this.open=void 0}render(){return index.h("div",{class:{bar:!0,"bar--open":this.open}},index.h("span",{part:"content",class:"bar__content"},index.h("slot",null)),index.h("span",{part:"button",class:"bar__button"},index.h("slot",{name:"button"})))}};PrestoActionBarUi.style=prestoActionBarUiCss;const prestoYoutubeSubscribeButtonCss=":host{display:block}",PrestoYoutubeSubscribeButton=class{constructor(t){index.registerInstance(this,t),this.channel=void 0,this.layout="default",this.showCount=void 0}waitForApi(t){var e=setInterval((function(){var r;(null===(r=null===window||void 0===window?void 0:window.gapi)||void 0===r?void 0:r.ytsubscribe)&&(clearInterval(e),t())}),50)}componentDidLoad(){const t=document.createElement("script");t.type="text/javascript",t.async=!1,t.src="https://apis.google.com/js/platform.js";const e=document.getElementsByTagName("script")[0];e&&e.parentNode.insertBefore(t,e),this.waitForApi((()=>{window.gapi.ytsubscribe.render(this.textInput,{channelId:this.channel,layout:this.layout,count:this.showCount?"default":"hidden"})}))}render(){return index.h("div",{class:"g-ytsubscribe",ref:t=>this.textInput=t})}};PrestoYoutubeSubscribeButton.style=":host{display:block}",exports.presto_action_bar_ui=PrestoActionBarUi,exports.presto_youtube_subscribe_button=PrestoYoutubeSubscribeButton;