export const MtzFileDownloadBehaviors=function(e){return class extends e{static get properties(){return super.properties?Object.assign({fileTypes:{type:Object,value:()=>({CSV:"text/csv",JSON:"text/json",PDF:"application/pdf",TXT:"text/plain",HTML:"text/html"})}},super.properties):{fileTypes:{type:Object,value:()=>({CSV:"text/csv",JSON:"text/json",PDF:"application/pdf",TXT:"text/plain",HTML:"text/html"})}}}downloadFromData(e,t,o="download",l=!0){const a=this.fileTypes[t.toUpperCase()],s=new Blob([decodeURIComponent(encodeURI(e))],{type:a}),n=o+"."+t.toLowerCase();if(globalThis.navigator&&globalThis.navigator.msSaveOrOpenBlob)globalThis.navigator.msSaveOrOpenBlob(s,n);else{const e=globalThis.document.createElement("a");e.href=(globalThis.URL||globalThis.webkitURL).createObjectURL(s),e.download=n,e.target=l?"_blank":"_self",this.appendChild(e),e.click(),this.removeChild(e)}}downloadFromURI(e,t=!0){return globalThis.open(e,t?"_blank":"_self"),!0}}};