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, Type } from "class-transformer";
import { IsArray, IsEnum, IsInstance, IsString, ValidateNested } from "class-validator";

//#region ../didcomm/src/modules/routing/messages/DidCommKeylistUpdateMessage.ts
var _ref;
let DidCommKeylistUpdateAction = /* @__PURE__ */ function(DidCommKeylistUpdateAction$1) {
	DidCommKeylistUpdateAction$1["add"] = "add";
	DidCommKeylistUpdateAction$1["remove"] = "remove";
	return DidCommKeylistUpdateAction$1;
}({});
var DidCommKeylistUpdate = class {
	constructor(options) {
		if (options) {
			this.recipientKey = options.recipientKey;
			this.action = options.action;
		}
	}
};
__decorate([
	IsString(),
	Expose({ name: "recipient_key" }),
	__decorateMetadata("design:type", String)
], DidCommKeylistUpdate.prototype, "recipientKey", void 0);
__decorate([IsEnum(DidCommKeylistUpdateAction), __decorateMetadata("design:type", typeof (_ref = typeof DidCommKeylistUpdateAction !== "undefined" && DidCommKeylistUpdateAction) === "function" ? _ref : Object)], DidCommKeylistUpdate.prototype, "action", void 0);
/**
* Used to notify the mediator of keys in use by the recipient.
*
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0211-route-coordination/README.md#keylist-update
*/
var DidCommKeylistUpdateMessage = class DidCommKeylistUpdateMessage extends DidCommMessage {
	constructor(options) {
		super();
		this.type = DidCommKeylistUpdateMessage.type.messageTypeUri;
		if (options) {
			this.id = options.id || this.generateId();
			this.updates = options.updates;
		}
	}
};
DidCommKeylistUpdateMessage.type = parseMessageType("https://didcomm.org/coordinate-mediation/1.0/keylist-update");
__decorate([IsValidMessageType(DidCommKeylistUpdateMessage.type), __decorateMetadata("design:type", Object)], DidCommKeylistUpdateMessage.prototype, "type", void 0);
__decorate([
	Type(() => DidCommKeylistUpdate),
	IsArray(),
	ValidateNested(),
	IsInstance(DidCommKeylistUpdate, { each: true }),
	__decorateMetadata("design:type", Array)
], DidCommKeylistUpdateMessage.prototype, "updates", void 0);

//#endregion
export { DidCommKeylistUpdate, DidCommKeylistUpdateAction, DidCommKeylistUpdateMessage };
//# sourceMappingURL=DidCommKeylistUpdateMessage.mjs.map