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AI,CAAC,MAAM,0CAAE,WAAW,CACJ,EACvB;KACH;IAED,oBAAoB,CAAC,GAAG;QACtB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACrC;IACD,MAAM;;QACJ,QACE,6EACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE;gBACL,gCAAgC,EAAE,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,gBAAgB,KAAI,SAAS;aAC7E,IAEA,MAAA,IAAI,CAAC,MAAM;eAAE,IAAI,EAElB,4DAAK,IAAI,EAAC,QAAQ,IACf,IAAI,CAAC,aAAa,EAAE,EACpB,IAAI,CAAC,YAAY,EAAE,CAChB,CACe,EACvB;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/core/features/presto-action-bar/controller/presto-action-bar-controller.scss?tag=presto-action-bar-controller&encapsulation=shadow","src/components/core/features/presto-action-bar/controller/presto-action-bar-controller.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\nimport { ActionBarConfig, YoutubeConfig } from '../../../../../interfaces';\nimport { timePassed } from '../../../../../util';\n\n@Component({\n tag: 'presto-action-bar-controller',\n styleUrl: 'presto-action-bar-controller.scss',\n shadow: true,\n})\nexport class PrestoActionBar {\n @Element() el: HTMLElement;\n\n @Prop() ended: boolean;\n @Prop() config: ActionBarConfig;\n @Prop({ reflect: true }) currentTime: number;\n @Prop({ reflect: true }) duration: number;\n @Prop() direction?: 'rtl';\n @Prop() youtube?: YoutubeConfig;\n\n @State() show: boolean = false;\n @State() youtubeRenderKey: number = 1;\n @State() percentagePassed: number = 0;\n @Event() actionBarStateChange: EventEmitter<boolean>;\n\n componentWillLoad() {\n this.handleDuration();\n }\n\n /**\n * Wait for duration to start before checking time\n * @returns void\n */\n @Watch('duration')\n handleDuration() {\n this.handleTime();\n }\n\n /**\n * Handle with the player is ended\n * @param val\n * @returns\n */\n @Watch('ended')\n handleEnded(val) {\n if (val) {\n if (this?.config?.percentage_start !== 100) return;\n this.show = true;\n }\n }\n\n @Watch('currentTime')\n @Watch('duration')\n handlePercentagePassed() {\n this.percentagePassed = (this.currentTime / this.duration) * 100;\n }\n\n /**\n * When current time changes, check to see if we should\n * enable the overlay\n * @returns void\n */\n @Watch('currentTime')\n handleTime() {\n this.checkTime();\n }\n\n /**\n * Set enabled/disabled based on time that has passed\n */\n checkTime() {\n if (window?.wp?.blocks) {\n this.show = true;\n return;\n }\n // if ( this.config?.percentage_start === 0) {\n // this.show = true;\n // } else {\n\n // console.log(this.currentTime, this.duration, this.config?.percentage_start);\n this.show = timePassed({\n current: this.currentTime,\n duration: this.duration,\n showAfter: this.config?.percentage_start,\n });\n }\n\n @Watch('config')\n handleButtonCountChange(newVal, oldVal) {\n if (newVal?.button_count !== oldVal?.button_count) {\n this.youtubeRenderKey++;\n }\n if (newVal?.enabled) {\n this.handleDuration();\n }\n }\n\n youtubeButton() {\n if (this.config?.button_type !== 'youtube' || !this.youtube?.channelId) {\n return;\n }\n\n return <presto-youtube-subscribe-button key={this.youtubeRenderKey} channel={this.youtube?.channelId} showCount={this.config?.button_count}></presto-youtube-subscribe-button>;\n }\n\n customButton() {\n if (this.config?.button_type !== 'custom') {\n return;\n }\n\n return (\n <presto-player-button\n type=\"primary\"\n size=\"small\"\n href={this.config?.button_link?.url}\n target={this.config?.button_link?.opensInNewTab ? '_blank' : '_self'}\n style={{\n '--presto-player-button-border-radius': `${this.config?.button_radius}px`,\n ...(this.config?.button_color\n ? {\n '--presto-player-button-color': `${this.config?.button_color}`,\n }\n : {}),\n ...(this.config?.button_text_color\n ? {\n '--presto-player-button-text': `${this.config?.button_text_color}`,\n }\n : {}),\n }}\n >\n {this.config?.button_text}\n </presto-player-button>\n );\n }\n @Watch('show')\n handleCtaStateChange(val) {\n this.actionBarStateChange.emit(val);\n }\n render() {\n return (\n <presto-action-bar-ui\n open={this.show}\n style={{\n '--presto-action-bar-background': this.config?.background_color || '#1d1d1d',\n }}\n >\n {this.config?.text}\n\n <div slot=\"button\">\n {this.youtubeButton()}\n {this.customButton()}\n </div>\n </presto-action-bar-ui>\n );\n }\n}\n"],"version":3}