import { __decorateMetadata } from "../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
import { __decorate } from "../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
import { __decorateParam } from "../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateParam.mjs";
import { DidCommMediationRecord } from "./DidCommMediationRecord.mjs";
import { EventEmitter, InjectionSymbols, Repository, inject, injectable } from "@credo-ts/core";

//#region ../didcomm/src/modules/routing/repository/DidCommMediationRepository.ts
var _ref;
let DidCommMediationRepository = class DidCommMediationRepository$1 extends Repository {
	constructor(storageService, eventEmitter) {
		super(DidCommMediationRecord, storageService, eventEmitter);
	}
	getSingleByRecipientKey(agentContext, recipientKey) {
		return this.getSingleByQuery(agentContext, { recipientKeys: [recipientKey] });
	}
	async getByConnectionId(agentContext, connectionId) {
		return this.getSingleByQuery(agentContext, { connectionId });
	}
};
DidCommMediationRepository = __decorate([
	injectable(),
	__decorateParam(0, inject(InjectionSymbols.StorageService)),
	__decorateMetadata("design:paramtypes", [Object, typeof (_ref = typeof EventEmitter !== "undefined" && EventEmitter) === "function" ? _ref : Object])
], DidCommMediationRepository);

//#endregion
export { DidCommMediationRepository };
//# sourceMappingURL=DidCommMediationRepository.mjs.map