import{H as t}from"./p-b06e2bef.js";import{d as a}from"./p-2f569553.js";const{state:e,reset:s}=a({mediaUploading:!1}),r={state:e,reset:s};class o{constructor(){}static getInstance(){return o.instance||(o.instance=new o),o.instance}async uploadImage(a){let e,s=new FormData;for(let t=0;t<a.length;t++)s.append("uploads[]",a[t],a[t].name);r.state.mediaUploading=!0;try{e=await t.http.post("api/v1/MediaItems/Upload",s),e&&(r.state.mediaUploading=!1)}catch(t){r.state.mediaUploading=!1}return e}}export{o as M,r as m}