import{FileHashesLocalWriteRepository as i}from"./file-hashes-local-write-repository.js";import{FileHashesLocalReadRepository as r}from"./file-hashes-local-read-repository.js";import{BaseRepository as n}from"../../../providers/database/base-repository.js";import{LocalDatabaseInitializationStrategy as o}from"../../../providers/database/database-initialization-strategy.js";import{MAIN_LOCAL_DATABASE_FOLDER as l,MAIN_DATABASE_MIGRATIONS_FOLDER as h,MAIN_LOCAL_DATABASE_NAME as A}from"../../../providers/database/constants.js";class e extends n{static#e;#a;#t;constructor(t){super(t),this.#a=new r(this.databaseClient),this.#t=new i(this.databaseClient)}static async getInstance(t){if(!e.#e){const s=await new o().initialize({...t,databaseName:A,additionalFolder:l,migrationsFolder:h});e.#e=new e(s)}return e.#e}async getFileHashes(t={}){return this.#a.getFileHashes(t)}async getFileHashByHash(t){return this.#a.getFileHashByHash(t)}async upsertFileHash(t){return await this.#t.upsertFileHash(t)}async updateFileHashesStatus(t,a){return this.#t.updateFileHashes(t,a)}async deleteFileHashes(t){return this.#t.deleteFileHashes(t)}}export{e as FileHashesLocalRepository};
