const require_DidCommOutboundMessageContext = require('../../../../../models/DidCommOutboundMessageContext.js');
require('../../../../../models/index.js');
const require_DidCommStatusV2Message = require('../messages/DidCommStatusV2Message.js');
require('../messages/index.js');

//#region ../didcomm/src/modules/message-pickup/protocol/v2/handlers/DidCommStatusV2Handler.ts
var DidCommStatusV2Handler = class {
	constructor(messagePickupProtocol) {
		this.supportedMessages = [require_DidCommStatusV2Message.DidCommStatusV2Message];
		this.messagePickupProtocol = messagePickupProtocol;
	}
	async handle(messageContext) {
		const connection = messageContext.assertReadyConnection();
		const deliveryRequestMessage = await this.messagePickupProtocol.processStatus(messageContext);
		if (deliveryRequestMessage) return new require_DidCommOutboundMessageContext.DidCommOutboundMessageContext(deliveryRequestMessage, {
			agentContext: messageContext.agentContext,
			connection
		});
	}
};

//#endregion
exports.DidCommStatusV2Handler = DidCommStatusV2Handler;