import { __decorateMetadata } from "../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
import { __decorate } from "../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
import { IsValidMessageType, parseMessageType } from "../../../util/messageType.mjs";
import { DidCommMessage } from "../../../DidCommMessage.mjs";
import { Expose } from "class-transformer";
import { IsArray, IsNotEmpty, IsString } from "class-validator";

//#region ../didcomm/src/modules/routing/messages/DidCommMediationGrantMessage.ts
/**
* A route grant message is a signal from the mediator to the recipient that permission is given to distribute the
* included information as an inbound route.
*
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0211-route-coordination/README.md#mediation-grant
*/
var DidCommMediationGrantMessage = class DidCommMediationGrantMessage extends DidCommMessage {
	constructor(options) {
		super();
		this.type = DidCommMediationGrantMessage.type.messageTypeUri;
		if (options) {
			this.id = options.id ?? this.generateId();
			this.endpoint = options.endpoint;
			this.routingKeys = options.routingKeys;
			this.setThread({ threadId: options.threadId });
		}
	}
};
DidCommMediationGrantMessage.type = parseMessageType("https://didcomm.org/coordinate-mediation/1.0/mediate-grant");
__decorate([IsValidMessageType(DidCommMediationGrantMessage.type), __decorateMetadata("design:type", Object)], DidCommMediationGrantMessage.prototype, "type", void 0);
__decorate([
	IsNotEmpty(),
	IsArray(),
	Expose({ name: "routing_keys" }),
	__decorateMetadata("design:type", Array)
], DidCommMediationGrantMessage.prototype, "routingKeys", void 0);
__decorate([
	IsNotEmpty(),
	IsString(),
	__decorateMetadata("design:type", String)
], DidCommMediationGrantMessage.prototype, "endpoint", void 0);

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