import{b as r}from"./router-JNJkT0FW.js";import"./jwt-decode.esm-BJTSBhUK.js";(function(){try{var d=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(d._sentryDebugIds=d._sentryDebugIds||{},d._sentryDebugIds[e]="1d96e273-7bed-4b4b-8ed7-0d9d207b58b6",d._sentryDebugIdIdentifier="sentry-dbid-1d96e273-7bed-4b4b-8ed7-0d9d207b58b6")}catch{}})();class a{constructor(e){this.projectId=e}static fromProjectId(e){return new a(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 i=o.toString(),l=`projects/${this.projectId}/files?${i}`,c=await r.get(l);return{items:c.items,totalCount:c.totalCount}}async upload(e,t,s){const n=s?"&overwrite=true":"",o=`projects/${this.projectId}/files/upload?path=${encodeURIComponent(e)}${n}`,i=t instanceof File?t:t?new Blob([t]):new Blob([]);return r.post(o,i)}async download(e){return r.getBlob(`projects/${this.projectId}/files/download?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{a as F};
//# sourceMappingURL=file-BseRPgVG.js.map
