import{h}from"@stencil/core";export class PrestoTimestamp{constructor(){this.time=void 0}handleClick(t){t.preventDefault();const e=document.body.querySelector("presto-player");e&&e.goToAndPlay(this.timeToSeconds(this.time))}timeToSeconds(t){let e,s=t.split(":");return s.length>1&&(e=60*parseInt(s[0])),parseInt(s[1])+parseInt(e)}render(){return h("a",{href:"#",class:"presto-timestamp",onClick:t=>this.handleClick(t)},h("slot",null,this.time))}static get is(){return"presto-timestamp"}static get originalStyleUrls(){return{$:["presto-timestamp.scss"]}}static get styleUrls(){return{$:["presto-timestamp.css"]}}static get properties(){return{time:{type:"string",mutable:!1,complexType:{original:"string",resolved:"string",references:{}},required:!1,optional:!1,docs:{tags:[],text:""},attribute:"time",reflect:!1}}}}