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 { MessageIdRegExp } from "../../BaseDidCommMessage.mjs";
import { Expose } from "class-transformer";
import { IsEnum, IsOptional, Matches, ValidateIf } from "class-validator";

//#region ../didcomm/src/decorators/transport/TransportDecorator.ts
var _ref;
/**
* Return route types.
*/
let ReturnRouteTypes = /* @__PURE__ */ function(ReturnRouteTypes$1) {
	/** No messages should be returned over this connection. */
	ReturnRouteTypes$1["none"] = "none";
	/**  All messages for this key should be returned over this connection. */
	ReturnRouteTypes$1["all"] = "all";
	/** Send all messages matching this thread over this connection. */
	ReturnRouteTypes$1["thread"] = "thread";
	return ReturnRouteTypes$1;
}({});
/**
* Represents `~transport` decorator
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0092-transport-return-route/README.md
*/
var TransportDecorator = class {
	constructor(partial) {
		this.returnRoute = partial?.returnRoute;
		this.returnRouteThread = partial?.returnRouteThread;
	}
};
__decorate([
	Expose({ name: "return_route" }),
	IsEnum(ReturnRouteTypes),
	IsOptional(),
	__decorateMetadata("design:type", typeof (_ref = typeof ReturnRouteTypes !== "undefined" && ReturnRouteTypes) === "function" ? _ref : Object)
], TransportDecorator.prototype, "returnRoute", void 0);
__decorate([
	Expose({ name: "return_route_thread" }),
	ValidateIf((o) => o.returnRoute === ReturnRouteTypes.thread),
	Matches(MessageIdRegExp),
	__decorateMetadata("design:type", String)
], TransportDecorator.prototype, "returnRouteThread", void 0);

//#endregion
export { ReturnRouteTypes, TransportDecorator };
//# sourceMappingURL=TransportDecorator.mjs.map