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 { ThreadDecorator } from "./ThreadDecorator.mjs";
import { Expose, Type } from "class-transformer";
import { IsInstance, IsOptional, ValidateNested } from "class-validator";

//#region ../didcomm/src/decorators/thread/ThreadDecoratorExtension.ts
function ThreadDecorated(Base) {
	var _ref;
	class ThreadDecoratorExtension extends Base {
		get threadId() {
			return this.thread?.threadId ?? this.id;
		}
		setThread(options) {
			this.thread = new ThreadDecorator(options);
		}
	}
	__decorate([
		Expose({ name: "~thread" }),
		IsOptional(),
		Type(() => ThreadDecorator),
		ValidateNested(),
		IsInstance(ThreadDecorator),
		__decorateMetadata("design:type", typeof (_ref = typeof ThreadDecorator !== "undefined" && ThreadDecorator) === "function" ? _ref : Object)
	], ThreadDecoratorExtension.prototype, "thread", void 0);
	return ThreadDecoratorExtension;
}

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