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 { utils } from "@credo-ts/core";
import { Expose } from "class-transformer";
import { Matches } from "class-validator";

//#region ../didcomm/src/BaseDidCommMessage.ts
const MessageIdRegExp = /[-_./a-zA-Z0-9]{8,64}/;
const MessageTypeRegExp = /(.*?)([a-zA-Z0-9._-]+)\/(\d[^/]*)\/([a-zA-Z0-9._-]+)$/;
var BaseDidCommMessage = class {
	generateId() {
		return utils.uuid();
	}
};
__decorate([
	Matches(MessageIdRegExp),
	Expose({ name: "@id" }),
	__decorateMetadata("design:type", String)
], BaseDidCommMessage.prototype, "id", void 0);
__decorate([
	Expose({ name: "@type" }),
	Matches(MessageTypeRegExp),
	__decorateMetadata("design:type", String)
], BaseDidCommMessage.prototype, "type", void 0);

//#endregion
export { BaseDidCommMessage, MessageIdRegExp, MessageTypeRegExp };
//# sourceMappingURL=BaseDidCommMessage.mjs.map