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_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_AckDecoratorExtension = require('./decorators/ack/AckDecoratorExtension.js');
const require_AttachmentExtension = require('./decorators/attachment/AttachmentExtension.js');
const require_L10nDecoratorExtension = require('./decorators/l10n/L10nDecoratorExtension.js');
const require_ServiceDecoratorExtension = require('./decorators/service/ServiceDecoratorExtension.js');
const require_ThreadDecoratorExtension = require('./decorators/thread/ThreadDecoratorExtension.js');
const require_TimingDecoratorExtension = require('./decorators/timing/TimingDecoratorExtension.js');
const require_TransportDecoratorExtension = require('./decorators/transport/TransportDecoratorExtension.js');
const require_messageType = require('./util/messageType.js');
let __credo_ts_core = require("@credo-ts/core");
__credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);

//#region ../didcomm/src/DidCommMessage.ts
var import_cjs = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_index.require_cjs());
const Decorated = require_ThreadDecoratorExtension.ThreadDecorated(require_L10nDecoratorExtension.L10nDecorated(require_TransportDecoratorExtension.TransportDecorated(require_TimingDecoratorExtension.TimingDecorated(require_AckDecoratorExtension.AckDecorated(require_AttachmentExtension.AttachmentDecorated(require_ServiceDecoratorExtension.ServiceDecorated(require_BaseDidCommMessage.BaseDidCommMessage)))))));
var DidCommMessage = class extends Decorated {
	constructor(..._args) {
		super(..._args);
		this.allowDidSovPrefix = false;
		this.allowQueueTransport = true;
	}
	toJSON({ useDidSovPrefixWhereAllowed } = {}) {
		const json = __credo_ts_core.JsonTransformer.toJSON(this);
		if (this.allowDidSovPrefix && useDidSovPrefixWhereAllowed) require_messageType.replaceNewDidCommPrefixWithLegacyDidSovOnMessage(json);
		return json;
	}
	is(Class) {
		return this.type === Class.type.messageTypeUri;
	}
};
require_decorate.__decorate([(0, import_cjs.Exclude)(), require_decorateMetadata.__decorateMetadata("design:type", Boolean)], DidCommMessage.prototype, "allowDidSovPrefix", void 0);
require_decorate.__decorate([(0, import_cjs.Exclude)(), require_decorateMetadata.__decorateMetadata("design:type", Boolean)], DidCommMessage.prototype, "allowQueueTransport", void 0);

//#endregion
exports.DidCommMessage = DidCommMessage;