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

//#region ../didcomm/src/modules/discover-features/protocol/v1/handlers/DidCommFeaturesQueryMessageHandler.ts
var DidCommFeaturesQueryMessageHandler = class {
	constructor(discoverFeaturesService) {
		this.supportedMessages = [DidCommFeaturesQueryMessage];
		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 { DidCommFeaturesQueryMessageHandler };
//# sourceMappingURL=DidCommFeaturesQueryMessageHandler.mjs.map