const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.js');
const require_index = require('../../../../../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/index.js');
const require_index$1 = require('../../../../../../node_modules/.pnpm/class-validator@0.14.1/node_modules/class-validator/cjs/index.js');
const require_decorateMetadata = require('../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
const require_decorate = require('../../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
const require_messageType = require('../../../util/messageType.js');
const require_DidCommMessage = require('../../../DidCommMessage.js');
const require_transformers = require('../../../util/transformers.js');

//#region ../didcomm/src/modules/basic-messages/messages/DidCommBasicMessage.ts
var import_cjs = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_index.require_cjs());
var import_cjs$1 = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_index$1.require_cjs());
var _ref;
var DidCommBasicMessage = class DidCommBasicMessage extends require_DidCommMessage.DidCommMessage {
	/**
	* Create new DidCommBasicMessage instance.
	* sentTime will be assigned to new Date if not passed, id will be assigned to uuid/v4 if not passed
	* @param options
	*/
	constructor(options) {
		super();
		this.allowDidSovPrefix = true;
		this.type = DidCommBasicMessage.type.messageTypeUri;
		if (options) {
			this.id = options.id || this.generateId();
			this.sentTime = options.sentTime || /* @__PURE__ */ new Date();
			this.content = options.content;
			this.addLocale(options.locale || "en");
		}
	}
};
DidCommBasicMessage.type = require_messageType.parseMessageType("https://didcomm.org/basicmessage/1.0/message");
require_decorate.__decorate([require_messageType.IsValidMessageType(DidCommBasicMessage.type), require_decorateMetadata.__decorateMetadata("design:type", Object)], DidCommBasicMessage.prototype, "type", void 0);
require_decorate.__decorate([
	(0, import_cjs.Expose)({ name: "sent_time" }),
	(0, import_cjs.Transform)(({ value }) => require_transformers.DateParser(value)),
	(0, import_cjs$1.IsDate)(),
	require_decorateMetadata.__decorateMetadata("design:type", typeof (_ref = typeof Date !== "undefined" && Date) === "function" ? _ref : Object)
], DidCommBasicMessage.prototype, "sentTime", void 0);
require_decorate.__decorate([
	(0, import_cjs.Expose)({ name: "content" }),
	(0, import_cjs$1.IsString)(),
	require_decorateMetadata.__decorateMetadata("design:type", String)
], DidCommBasicMessage.prototype, "content", void 0);

//#endregion
exports.DidCommBasicMessage = DidCommBasicMessage;