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 { DateParser } from "../../../../../util/transformers.mjs";
import { Expose, Transform } from "class-transformer";
import { IsBoolean, IsDate, IsInt, IsOptional, IsString } from "class-validator";

//#region ../didcomm/src/modules/message-pickup/protocol/v2/messages/DidCommStatusV2Message.ts
var _ref, _ref2;
var DidCommStatusV2Message = class DidCommStatusV2Message extends DidCommMessage {
	constructor(options) {
		super();
		this.allowQueueTransport = false;
		this.type = DidCommStatusV2Message.type.messageTypeUri;
		if (options) {
			this.id = options.id || this.generateId();
			this.recipientKey = options.recipientKey;
			this.messageCount = options.messageCount;
			this.longestWaitedSeconds = options.longestWaitedSeconds;
			this.newestReceivedTime = options.newestReceivedTime;
			this.oldestReceivedTime = options.oldestReceivedTime;
			this.totalBytes = options.totalBytes;
			this.liveDelivery = options.liveDelivery;
			this.setThread({ threadId: options.threadId });
		}
		this.setReturnRouting(ReturnRouteTypes.all);
	}
};
DidCommStatusV2Message.type = parseMessageType("https://didcomm.org/messagepickup/2.0/status");
__decorate([IsValidMessageType(DidCommStatusV2Message.type), __decorateMetadata("design:type", Object)], DidCommStatusV2Message.prototype, "type", void 0);
__decorate([
	IsString(),
	IsOptional(),
	Expose({ name: "recipient_key" }),
	__decorateMetadata("design:type", String)
], DidCommStatusV2Message.prototype, "recipientKey", void 0);
__decorate([
	IsInt(),
	Expose({ name: "message_count" }),
	__decorateMetadata("design:type", Number)
], DidCommStatusV2Message.prototype, "messageCount", void 0);
__decorate([
	IsInt(),
	IsOptional(),
	Expose({ name: "longest_waited_seconds" }),
	__decorateMetadata("design:type", Number)
], DidCommStatusV2Message.prototype, "longestWaitedSeconds", void 0);
__decorate([
	Expose({ name: "newest_received_time" }),
	Transform(({ value }) => DateParser(value)),
	IsDate(),
	IsOptional(),
	__decorateMetadata("design:type", typeof (_ref = typeof Date !== "undefined" && Date) === "function" ? _ref : Object)
], DidCommStatusV2Message.prototype, "newestReceivedTime", void 0);
__decorate([
	IsOptional(),
	Transform(({ value }) => DateParser(value)),
	IsDate(),
	Expose({ name: "oldest_received_time" }),
	__decorateMetadata("design:type", typeof (_ref2 = typeof Date !== "undefined" && Date) === "function" ? _ref2 : Object)
], DidCommStatusV2Message.prototype, "oldestReceivedTime", void 0);
__decorate([
	IsOptional(),
	IsInt(),
	Expose({ name: "total_bytes" }),
	__decorateMetadata("design:type", Number)
], DidCommStatusV2Message.prototype, "totalBytes", void 0);
__decorate([
	IsOptional(),
	IsBoolean(),
	Expose({ name: "live_delivery" }),
	__decorateMetadata("design:type", Boolean)
], DidCommStatusV2Message.prototype, "liveDelivery", void 0);

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