import { DidCommOutboundMessageContext } from "../../../../../models/DidCommOutboundMessageContext.mjs";
import "../../../../../models/index.mjs";
import { DidCommBatchMessage } from "../messages/DidCommBatchMessage.mjs";
import "../messages/index.mjs";

//#region ../didcomm/src/modules/message-pickup/protocol/v1/handlers/DidCommBatchHandler.ts
var DidCommBatchHandler = class {
	constructor(messagePickupProtocol) {
		this.supportedMessages = [DidCommBatchMessage];
		this.messagePickupProtocol = messagePickupProtocol;
	}
	async handle(messageContext) {
		const connection = messageContext.assertReadyConnection();
		const batchRequestMessage = await this.messagePickupProtocol.processBatch(messageContext);
		if (batchRequestMessage) return new DidCommOutboundMessageContext(batchRequestMessage, {
			agentContext: messageContext.agentContext,
			connection
		});
	}
};

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