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

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

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