const require_DidCommOutboundMessageContext = require('../../../../../models/DidCommOutboundMessageContext.js');
require('../../../../../models/index.js');
const require_DidCommFeaturesQueryMessage = require('../messages/DidCommFeaturesQueryMessage.js');
require('../messages/index.js');

//#region ../didcomm/src/modules/discover-features/protocol/v1/handlers/DidCommFeaturesQueryMessageHandler.ts
var DidCommFeaturesQueryMessageHandler = class {
	constructor(discoverFeaturesService) {
		this.supportedMessages = [require_DidCommFeaturesQueryMessage.DidCommFeaturesQueryMessage];
		this.discoverFeaturesService = discoverFeaturesService;
	}
	async handle(inboundMessage) {
		const connection = inboundMessage.assertReadyConnection();
		const discloseMessage = await this.discoverFeaturesService.processQuery(inboundMessage);
		if (discloseMessage) return new require_DidCommOutboundMessageContext.DidCommOutboundMessageContext(discloseMessage.message, {
			agentContext: inboundMessage.agentContext,
			connection
		});
	}
};

//#endregion
exports.DidCommFeaturesQueryMessageHandler = DidCommFeaturesQueryMessageHandler;