import{h}from"@stencil/core";export class PrestoEmailOverlay{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,r;this.currentTime=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.plyr.currentTime,this.duration=null===(r=null==e?void 0:e.detail)||void 0===r?void 0:r.plyr.duration}disconnectedCallback(){this.player&&(this.player.off("ended",this.setEnded),this.player.off("timeupdate",this.setCurrentTime))}render(){var e,t;return h("presto-email-overlay-controller",{key:"ccdb3335179aced53bfe8ba1c0f4594e5aa6051c",ended:this.ended,currentTime:this.currentTime,videoId:this.videoId,duration:this.duration,direction:this.direction,presetId:null===(e=this.preset)||void 0===e?void 0:e.id,emailCollection:null===(t=this.preset)||void 0===t?void 0:t.email_collection,i18n:this.i18n,provider:this.provider})}static get is(){return"presto-email-overlay"}static get originalStyleUrls(){return{$:["presto-email-overlay.css"]}}static get styleUrls(){return{$:["presto-email-overlay.css"]}}static get properties(){return{player:{type:"any",attribute:"player",mutable:!1,complexType:{original:"any",resolved:"any",references:{}},required:!1,optional:!1,docs:{tags:[],text:""},getter:!1,setter:!1,reflect:!1},direction:{type:"string",attribute:"direction",mutable:!1,complexType:{original:"'rtl'",resolved:'"rtl"',references:{}},required:!1,optional:!0,docs:{tags:[],text:""},getter:!1,setter:!1,reflect:!1},preset:{type:"unknown",attribute:"preset",mutable:!1,complexType:{original:"presetAttributes",resolved:"presetAttributes",references:{presetAttributes:{location:"import",path:"../../../../../interfaces",id:"src/interfaces.ts::presetAttributes"}}},required:!1,optional:!1,docs:{tags:[],text:""},getter:!1,setter:!1},videoId:{type:"number",attribute:"video-id",mutable:!1,complexType:{original:"number",resolved:"number",references:{}},required:!1,optional:!1,docs:{tags:[],text:""},getter:!1,setter:!1,reflect:!1},i18n:{type:"unknown",attribute:"i-1-8n",mutable:!1,complexType:{original:"i18nConfig",resolved:"i18nConfig",references:{i18nConfig:{location:"import",path:"../../../../../interfaces",id:"src/interfaces.ts::i18nConfig"}}},required:!1,optional:!1,docs:{tags:[],text:""},getter:!1,setter:!1},provider:{type:"string",attribute:"provider",mutable:!1,complexType:{original:"string",resolved:"string",references:{}},required:!1,optional:!1,docs:{tags:[],text:""},getter:!1,setter:!1,reflect:!1}}}static get states(){return{currentTime:{},duration:{},ended:{}}}}