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 { DidCommAttachment } from "../../../decorators/attachment/DidCommAttachment.mjs";
import { IsValidMessageType, parseMessageType } from "../../../util/messageType.mjs";
import { DidCommMessage } from "../../../DidCommMessage.mjs";
import { Expose, Type } from "class-transformer";
import { IsOptional, IsString, ValidateNested } from "class-validator";

//#region ../didcomm/src/modules/connections/messages/DidCommDidExchangeResponseMessage.ts
var _ref, _ref2;
/**
* Message part of connection protocol used to complete the connection
*
* @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0023-did-exchange/README.md#2-exchange-response
*/
var DidCommDidExchangeResponseMessage = class DidCommDidExchangeResponseMessage extends DidCommMessage {
	/**
	* Create new DidExchangeResponseMessage instance.
	* @param options
	*/
	constructor(options) {
		super();
		this.type = DidCommDidExchangeResponseMessage.type.messageTypeUri;
		if (options) {
			this.id = options.id || this.generateId();
			this.did = options.did;
			this.setThread({ threadId: options.threadId });
		}
	}
};
DidCommDidExchangeResponseMessage.type = parseMessageType("https://didcomm.org/didexchange/1.1/response");
__decorate([IsValidMessageType(DidCommDidExchangeResponseMessage.type), __decorateMetadata("design:type", Object)], DidCommDidExchangeResponseMessage.prototype, "type", void 0);
__decorate([IsString(), __decorateMetadata("design:type", String)], DidCommDidExchangeResponseMessage.prototype, "did", void 0);
__decorate([
	Expose({ name: "did_doc~attach" }),
	IsOptional(),
	Type(() => DidCommAttachment),
	ValidateNested(),
	__decorateMetadata("design:type", typeof (_ref = typeof DidCommAttachment !== "undefined" && DidCommAttachment) === "function" ? _ref : Object)
], DidCommDidExchangeResponseMessage.prototype, "didDoc", void 0);
__decorate([
	Expose({ name: "did_rotate~attach" }),
	IsOptional(),
	Type(() => DidCommAttachment),
	ValidateNested(),
	__decorateMetadata("design:type", typeof (_ref2 = typeof DidCommAttachment !== "undefined" && DidCommAttachment) === "function" ? _ref2 : Object)
], DidCommDidExchangeResponseMessage.prototype, "didRotate", void 0);

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