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

//#region ../didcomm/src/modules/routing/messages/DidCommKeylistUpdateResponseMessage.ts
var _ref, _ref2;
let DidCommKeylistUpdateResult = /* @__PURE__ */ function(DidCommKeylistUpdateResult$1) {
	DidCommKeylistUpdateResult$1["ClientError"] = "client_error";
	DidCommKeylistUpdateResult$1["ServerError"] = "server_error";
	DidCommKeylistUpdateResult$1["NoChange"] = "no_change";
	DidCommKeylistUpdateResult$1["Success"] = "success";
	return DidCommKeylistUpdateResult$1;
}({});
var DidCommKeylistUpdated = class {
	constructor(options) {
		if (options) {
			this.recipientKey = options.recipientKey;
			this.action = options.action;
			this.result = options.result;
		}
	}
};
__decorate([
	IsString(),
	Expose({ name: "recipient_key" }),
	__decorateMetadata("design:type", String)
], DidCommKeylistUpdated.prototype, "recipientKey", void 0);
__decorate([IsEnum(DidCommKeylistUpdateAction), __decorateMetadata("design:type", typeof (_ref = typeof DidCommKeylistUpdateAction !== "undefined" && DidCommKeylistUpdateAction) === "function" ? _ref : Object)], DidCommKeylistUpdated.prototype, "action", void 0);
__decorate([IsEnum(DidCommKeylistUpdateResult), __decorateMetadata("design:type", typeof (_ref2 = typeof DidCommKeylistUpdateResult !== "undefined" && DidCommKeylistUpdateResult) === "function" ? _ref2 : Object)], DidCommKeylistUpdated.prototype, "result", void 0);
/**
* Used to notify an edge agent with the result of updating the routing keys in the mediator.
*
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0211-route-coordination/README.md#keylist-update-response
*/
var DidCommKeylistUpdateResponseMessage = class DidCommKeylistUpdateResponseMessage extends DidCommMessage {
	constructor(options) {
		super();
		this.type = DidCommKeylistUpdateResponseMessage.type.messageTypeUri;
		if (options) {
			this.id = options.id || this.generateId();
			this.updated = options.keylist;
			this.setThread({ threadId: options.threadId });
		}
	}
};
DidCommKeylistUpdateResponseMessage.type = parseMessageType("https://didcomm.org/coordinate-mediation/1.0/keylist-update-response");
__decorate([IsValidMessageType(DidCommKeylistUpdateResponseMessage.type), __decorateMetadata("design:type", Object)], DidCommKeylistUpdateResponseMessage.prototype, "type", void 0);
__decorate([
	Type(() => DidCommKeylistUpdated),
	IsArray(),
	ValidateNested(),
	IsInstance(DidCommKeylistUpdated, { each: true }),
	__decorateMetadata("design:type", Array)
], DidCommKeylistUpdateResponseMessage.prototype, "updated", void 0);

//#endregion
export { DidCommKeylistUpdateResponseMessage, DidCommKeylistUpdateResult, DidCommKeylistUpdated };
//# sourceMappingURL=DidCommKeylistUpdateResponseMessage.mjs.map