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 { Expose } from "class-transformer";
import { IsInt, IsOptional, Matches } from "class-validator";

//#region ../didcomm/src/decorators/thread/ThreadDecorator.ts
const PthidRegExp = /^([-_./A-Za-z0-9]{8,64}|did:[a-z0-9]+:(?:%[0-9A-Fa-f]{2}|[A-Za-z0-9.-])+(?::(?:%[0-9A-Fa-f]{2}|[A-Za-z0-9._~!$&'()*+,;=:@/?-])*)*(?:\?(?:%[0-9A-Fa-f]{2}|[A-Za-z0-9._~!$&'()*+,;=:@/?-])*)?(?:#(?:%[0-9A-Fa-f]{2}|[A-Za-z0-9._~!$&'()*+,;=:@/?-])*)?)$/;
/**
* Represents `~thread` decorator
* @see https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0008-message-id-and-threading/README.md
*/
var ThreadDecorator = class {
	constructor(partial) {
		this.threadId = partial?.threadId;
		this.parentThreadId = partial?.parentThreadId;
		this.senderOrder = partial?.senderOrder;
		this.receivedOrders = partial?.receivedOrders;
	}
};
__decorate([
	Expose({ name: "thid" }),
	Matches(PthidRegExp),
	IsOptional(),
	__decorateMetadata("design:type", String)
], ThreadDecorator.prototype, "threadId", void 0);
__decorate([
	Expose({ name: "pthid" }),
	Matches(PthidRegExp),
	IsOptional(),
	__decorateMetadata("design:type", String)
], ThreadDecorator.prototype, "parentThreadId", void 0);
__decorate([
	Expose({ name: "sender_order" }),
	IsOptional(),
	IsInt(),
	__decorateMetadata("design:type", Number)
], ThreadDecorator.prototype, "senderOrder", void 0);
__decorate([
	Expose({ name: "received_orders" }),
	IsOptional(),
	__decorateMetadata("design:type", Object)
], ThreadDecorator.prototype, "receivedOrders", void 0);

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