import{prepareListResponse as n}from"../../../web-server/utils/prepare-list-response.js";import{FileHashesLocalRepository as r}from"../repositories/file-hashes-local-repository.js";class s{static#s;#t;constructor(t){this.#t=t}static async#a(t){const a=await r.getInstance(t),e=new s(a);s.#s=e}static async getInstance(t){return t.removeExisting===void 0&&(t.removeExisting=!1),s.#s||await s.#a(t),s.#s}async getFileHashes(t={}){const{items:a,total:e,hasMore:i}=await this.#t.getFileHashes(t);return n({data:a,params:t,totalCount:e,hasMore:i})}async getFileHashByHash(t){return await this.#t.getFileHashByHash(t)}async upsertFileHash(t){return await this.#t.upsertFileHash(t)}async updateFileHashes(t,a){return await this.#t.updateFileHashesStatus(t,a)}async deleteFileHashes(t){return await this.#t.deleteFileHashes(t)}}export{s as FileHashesService};
