import{b as r}from"./router-C-Pd0gHD.js";import"./jwt-decode.esm-CuqABuF0.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="7bff9531-9b9d-4245-a336-8fa10afae7a3",a._sentryDebugIdIdentifier="sentry-dbid-7bff9531-9b9d-4245-a336-8fa10afae7a3")}catch{}})();class c{constructor(e){this.projectId=e}static fromProjectId(e){return new c(e)}async list(e,t,s,n){const o=new URLSearchParams;o.set("limit",e.toString()),o.set("offset",t.toString()),s&&s.trim()&&o.set("search",s.trim()),n&&n.trim()&&o.set("path",n.trim());const d=o.toString(),l=`projects/${this.projectId}/files?${d}`,i=await r.get(l);return{items:i.items,totalCount:i.totalCount}}async upload(e,t,s){const n=s?"&overwrite=true":"",o=`projects/${this.projectId}/files/upload?path=${encodeURIComponent(e)}${n}`,d=t instanceof File?t:t?new Blob([t]):new Blob([]);return r.post(o,d)}async download(e){return r.getBlob(`projects/${this.projectId}/files/download?path=${encodeURIComponent(e)}`)}async downloadFolder(e){return r.getBlob(`projects/${this.projectId}/files/download-folder?path=${encodeURIComponent(e)}`)}async delete(e){return r.delete(`projects/${this.projectId}/files?path=${encodeURIComponent(e)}`)}async move(e,t){return r.post(`projects/${this.projectId}/files/move`,{path:e,newPath:t})}async createFolder(e){return r.post(`projects/${this.projectId}/files/create-folder`,{path:e})}}export{c as F};
//# sourceMappingURL=file-Cv5CaKwD.js.map
