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_BaseDidCommMessage = require('../../../../../BaseDidCommMessage.js');
const require_messageType = require('../../../../../util/messageType.js');
const require_DidCommMessage = require('../../../../../DidCommMessage.js');
let __credo_ts_core = require("@credo-ts/core");
__credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);

//#region ../didcomm/src/modules/message-pickup/protocol/v1/messages/DidCommBatchMessage.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 DidCommBatchMessageMessage = class {
	constructor(options) {
		if (options) {
			this.id = options.id || __credo_ts_core.utils.uuid();
			this.message = options.message;
		}
	}
};
require_decorate.__decorate([(0, import_cjs$1.Matches)(require_BaseDidCommMessage.MessageIdRegExp), require_decorateMetadata.__decorateMetadata("design:type", String)], DidCommBatchMessageMessage.prototype, "id", void 0);
require_decorate.__decorate([(0, import_cjs$1.IsObject)(), require_decorateMetadata.__decorateMetadata("design:type", Object)], DidCommBatchMessageMessage.prototype, "message", void 0);
/**
* A message that contains multiple waiting messages.
*
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0212-pickup/README.md#batch
*/
var DidCommBatchMessage = class DidCommBatchMessage extends require_DidCommMessage.DidCommMessage {
	constructor(options) {
		super();
		this.allowQueueTransport = false;
		this.type = DidCommBatchMessage.type.messageTypeUri;
		if (options) {
			this.id = options.id || this.generateId();
			this.messages = options.messages;
			if (options.threadId) this.setThread({ threadId: options.threadId });
		}
	}
};
DidCommBatchMessage.type = require_messageType.parseMessageType("https://didcomm.org/messagepickup/1.0/batch");
require_decorate.__decorate([require_messageType.IsValidMessageType(DidCommBatchMessage.type), require_decorateMetadata.__decorateMetadata("design:type", Object)], DidCommBatchMessage.prototype, "type", void 0);
require_decorate.__decorate([
	(0, import_cjs.Type)(() => DidCommBatchMessageMessage),
	(0, import_cjs$1.IsArray)(),
	(0, import_cjs$1.ValidateNested)(),
	(0, import_cjs$1.IsInstance)(DidCommBatchMessageMessage, { each: true }),
	(0, import_cjs.Expose)({ name: "messages~attach" }),
	require_decorateMetadata.__decorateMetadata("design:type", Array)
], DidCommBatchMessage.prototype, "messages", void 0);

//#endregion
exports.DidCommBatchMessage = DidCommBatchMessage;
exports.DidCommBatchMessageMessage = DidCommBatchMessageMessage;