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

//#region ../didcomm/src/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.ts
var DidCommMessageDeliveryV2Message = class DidCommMessageDeliveryV2Message extends DidCommMessage {
	constructor(options) {
		super();
		this.allowQueueTransport = false;
		this.type = DidCommMessageDeliveryV2Message.type.messageTypeUri;
		if (options) {
			this.id = options.id || this.generateId();
			this.recipientKey = options.recipientKey;
			this.appendedAttachments = options.attachments;
			if (this.threadId) this.setThread({ threadId: options.threadId });
		}
		this.setReturnRouting(ReturnRouteTypes.all);
	}
};
DidCommMessageDeliveryV2Message.type = parseMessageType("https://didcomm.org/messagepickup/2.0/delivery");
__decorate([IsValidMessageType(DidCommMessageDeliveryV2Message.type), __decorateMetadata("design:type", Object)], DidCommMessageDeliveryV2Message.prototype, "type", void 0);
__decorate([
	IsString(),
	IsOptional(),
	Expose({ name: "recipient_key" }),
	__decorateMetadata("design:type", String)
], DidCommMessageDeliveryV2Message.prototype, "recipientKey", void 0);

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