const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.js');
const require_decorateMetadata = require('../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
const require_decorate = require('../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
const require_decorateParam = require('../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateParam.js');
const require_DidCommProofExchangeRecord = require('./DidCommProofExchangeRecord.js');
let __credo_ts_core = require("@credo-ts/core");
__credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);

//#region ../didcomm/src/modules/proofs/repository/DidCommProofExchangeRepository.ts
var _ref;
let DidCommProofExchangeRepository = class DidCommProofExchangeRepository$1 extends __credo_ts_core.Repository {
	constructor(storageService, eventEmitter) {
		super(require_DidCommProofExchangeRecord.DidCommProofExchangeRecord, storageService, eventEmitter);
	}
	/**
	* Retrieve a proof record by connection id and thread id
	*
	* @param connectionId The connection id
	* @param threadId The thread id
	* @throws {RecordNotFoundError} If no record is found
	* @throws {RecordDuplicateError} If multiple records are found
	* @returns The proof record
	*/
	async getByThreadAndConnectionId(agentContext, threadId, connectionId) {
		return this.getSingleByQuery(agentContext, {
			threadId,
			connectionId
		});
	}
	/**
	* Retrieve proof records by connection id and parent thread id
	*
	* @param connectionId The connection id
	* @param parentThreadId The parent thread id
	* @returns List containing all proof records matching the given query
	*/
	async getByParentThreadAndConnectionId(agentContext, parentThreadId, connectionId) {
		return this.findByQuery(agentContext, {
			parentThreadId,
			connectionId
		});
	}
};
DidCommProofExchangeRepository = require_decorate.__decorate([
	(0, __credo_ts_core.injectable)(),
	require_decorateParam.__decorateParam(0, (0, __credo_ts_core.inject)(__credo_ts_core.InjectionSymbols.StorageService)),
	require_decorateMetadata.__decorateMetadata("design:paramtypes", [Object, typeof (_ref = typeof __credo_ts_core.EventEmitter !== "undefined" && __credo_ts_core.EventEmitter) === "function" ? _ref : Object])
], DidCommProofExchangeRepository);

//#endregion
Object.defineProperty(exports, 'DidCommProofExchangeRepository', {
  enumerable: true,
  get: function () {
    return DidCommProofExchangeRepository;
  }
});