import{r as t,h as s,g as e}from"./p-3ba9c73c.js";import{l as i}from"./p-2b74e80e.js";const h=class{constructor(s){t(this,s),this.metadata={},this.location="",this.autoplay=!1,this.labelAutoplay="Autoplay",this.placeholderLocation="Video URL",this._link=i(this,this.handleInput),this._location=this._link("location"),this._autoplay=this._link("autoplay")}handleInput(t,s){const e=s.target;e&&(s.cancelBubble=!0,this[t]=e.value,this.value=this.updateValue({[t]:e.value}),this.el.dispatchEvent(new Event("input",{bubbles:!0})))}updateValue(t={}){const s={location:this.location,autoplay:this.autoplay,metadata:Object.assign({},this.metadata)};return Object.assign({},s,t)}componentDidLoad(){this.value=this.updateValue(),this.el.dispatchEvent(new Event("input",{bubbles:!0}))}render(){return[s("bce-upload-input",Object.assign({},this._location,{labelUploadButton:this.labelUploadButton,labelDeleteButton:this.labelDeleteButton})),s("bce-input",Object.assign({type:"switch"},this._autoplay))]}get el(){return e(this)}};export{h as bce_element_video_template};