const require_DidCommOutboundMessageContext = require('../../../../../models/DidCommOutboundMessageContext.js');
require('../../../../../models/index.js');
const require_DidCommFeaturesQueriesMessage = require('../messages/DidCommFeaturesQueriesMessage.js');
require('../messages/index.js');

//#region ../didcomm/src/modules/discover-features/protocol/v2/handlers/DidCommFeaturesQueriesMessageHandler.ts
var DidCommFeaturesQueriesMessageHandler = class {
	constructor(discoverFeaturesService) {
		this.supportedMessages = [require_DidCommFeaturesQueriesMessage.DidCommFeaturesQueriesMessage];
		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.DidCommFeaturesQueriesMessageHandler = DidCommFeaturesQueriesMessageHandler;