text: import{html as e,css as o}from"../../../lit/index.js";import{winEventsElement as t}from"../../utils/utils.js";import{HAXStore as a}from"./hax-store.js";import{HaxUploadField as l}from"./hax-upload-field.js";class HaxTrayUpload extends l{static get tag(){return"hax-tray-upload"}constructor(){super(),this.t={...super.t,uploadMedia:"Upload Media"},this.registerLocalization({context:this,namespace:"hax"}),this.__winEvents={"hax-app-picker-selection":"_haxAppPickerSelection","place-holder-file-drop":"_placeHolderFileDrop"}}updated(e){super.updated&&super.updated(e),e.forEach(((e,o)=>{"t"==o&&(this.label=this.t.uploadMedia)}))}_fileUploadResponse(e){super._fileUploadResponse(e),this.newAssetConfigure()}_canUpload(){return!this.__allowUpload}newAssetConfigure(){let e={source:this.shadowRoot.querySelector("#url").value,title:this.shadowRoot.querySelector("#url").value};a.insertLogicFromValues(e,this)}_placeHolderFileDrop(e){a.activePlaceHolder=e.detail.placeHolderElement,this.shadowRoot.querySelector("#fileupload")._onDrop(e.detail)}}window.customElements.define(HaxTrayUpload.tag,HaxTrayUpload);export{HaxTrayUpload};