import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{d as defineCustomElement$4}from"./presto-action-bar-controller2.js";import{d as defineCustomElement$3}from"./presto-action-bar-ui2.js";import{d as defineCustomElement$2}from"./presto-player-button2.js";import{d as defineCustomElement$1}from"./presto-youtube-subscribe-button2.js";const prestoActionBarCss=":host{display:block}",PrestoActionBarStyle0=prestoActionBarCss,PrestoActionBar=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.player=void 0,this.config=void 0,this.direction=void 0,this.youtube=void 0,this.currentTime=void 0,this.duration=void 0,this.ended=void 0}componentWillLoad(){this.player&&(this.player.on("ended",(()=>this.setEnded())),this.player.on("timeupdate",(e=>this.setCurrentTime(e))))}setEnded(){this.ended=!0}setCurrentTime(e){var t,o;this.currentTime=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.plyr.currentTime,this.duration=null===(o=null==e?void 0:e.detail)||void 0===o?void 0:o.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){return h("presto-action-bar-controller",{key:"68bb051b0412e81363952dffec787ffceeff0899",ended:this.ended,config:this.config,currentTime:this.currentTime,duration:this.duration,direction:this.direction,youtube:this.youtube})}get el(){return this}static get style(){return PrestoActionBarStyle0}},[1,"presto-action-bar",{player:[8],config:[16],direction:[1],youtube:[16],currentTime:[32],duration:[32],ended:[32]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["presto-action-bar","presto-action-bar-controller","presto-action-bar-ui","presto-player-button","presto-youtube-subscribe-button"].forEach((e=>{switch(e){case"presto-action-bar":customElements.get(e)||customElements.define(e,PrestoActionBar);break;case"presto-action-bar-controller":customElements.get(e)||defineCustomElement$4();break;case"presto-action-bar-ui":customElements.get(e)||defineCustomElement$3();break;case"presto-player-button":customElements.get(e)||defineCustomElement$2();break;case"presto-youtube-subscribe-button":customElements.get(e)||defineCustomElement$1()}}))}export{PrestoActionBar as P,defineCustomElement as d};