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

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

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