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