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_DidCommAttachment = require('../../../../../decorators/attachment/DidCommAttachment.js');
const require_messageType = require('../../../../../util/messageType.js');
const require_DidCommMessage = require('../../../../../DidCommMessage.js');
const require_DidCommProofFormatSpec = require('../../../models/DidCommProofFormatSpec.js');
let __credo_ts_core = require("@credo-ts/core");
__credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);

//#region ../didcomm/src/modules/proofs/protocol/v2/messages/DidCommRequestPresentationV2Message.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 DidCommRequestPresentationV2Message = class DidCommRequestPresentationV2Message extends require_DidCommMessage.DidCommMessage {
	constructor(options) {
		super();
		this.type = DidCommRequestPresentationV2Message.type.messageTypeUri;
		this.willConfirm = false;
		this.presentMultiple = false;
		if (options) {
			this.formats = [];
			this.requestAttachments = [];
			this.id = options.id ?? __credo_ts_core.utils.uuid();
			this.comment = options.comment;
			this.goal = options.goal;
			this.goalCode = options.goalCode;
			this.willConfirm = options.willConfirm ?? true;
			this.presentMultiple = options.presentMultiple ?? false;
			this.requestAttachments = options.requestAttachments;
			this.formats = options.formats;
		}
	}
	getRequestAttachmentById(id) {
		return this.requestAttachments.find((attachment) => attachment.id === id);
	}
};
DidCommRequestPresentationV2Message.type = require_messageType.parseMessageType("https://didcomm.org/present-proof/2.0/request-presentation");
require_decorate.__decorate([require_messageType.IsValidMessageType(DidCommRequestPresentationV2Message.type), require_decorateMetadata.__decorateMetadata("design:type", Object)], DidCommRequestPresentationV2Message.prototype, "type", void 0);
require_decorate.__decorate([
	(0, import_cjs$1.IsString)(),
	(0, import_cjs$1.IsOptional)(),
	require_decorateMetadata.__decorateMetadata("design:type", String)
], DidCommRequestPresentationV2Message.prototype, "comment", void 0);
require_decorate.__decorate([
	(0, import_cjs.Expose)({ name: "goal_code" }),
	(0, import_cjs$1.IsString)(),
	(0, import_cjs$1.IsOptional)(),
	require_decorateMetadata.__decorateMetadata("design:type", String)
], DidCommRequestPresentationV2Message.prototype, "goalCode", void 0);
require_decorate.__decorate([
	(0, import_cjs$1.IsString)(),
	(0, import_cjs$1.IsOptional)(),
	require_decorateMetadata.__decorateMetadata("design:type", String)
], DidCommRequestPresentationV2Message.prototype, "goal", void 0);
require_decorate.__decorate([
	(0, import_cjs.Expose)({ name: "will_confirm" }),
	(0, import_cjs$1.IsBoolean)(),
	require_decorateMetadata.__decorateMetadata("design:type", Object)
], DidCommRequestPresentationV2Message.prototype, "willConfirm", void 0);
require_decorate.__decorate([
	(0, import_cjs.Expose)({ name: "present_multiple" }),
	(0, import_cjs$1.IsBoolean)(),
	require_decorateMetadata.__decorateMetadata("design:type", Object)
], DidCommRequestPresentationV2Message.prototype, "presentMultiple", void 0);
require_decorate.__decorate([
	(0, import_cjs.Expose)({ name: "formats" }),
	(0, import_cjs.Type)(() => require_DidCommProofFormatSpec.DidCommProofFormatSpec),
	(0, import_cjs$1.IsArray)(),
	(0, import_cjs$1.ValidateNested)({ each: true }),
	(0, import_cjs$1.IsInstance)(require_DidCommProofFormatSpec.DidCommProofFormatSpec, { each: true }),
	require_decorateMetadata.__decorateMetadata("design:type", Array)
], DidCommRequestPresentationV2Message.prototype, "formats", void 0);
require_decorate.__decorate([
	(0, import_cjs.Expose)({ name: "request_presentations~attach" }),
	(0, import_cjs.Type)(() => require_DidCommAttachment.DidCommAttachment),
	(0, import_cjs$1.IsArray)(),
	(0, import_cjs$1.ValidateNested)({ each: true }),
	(0, import_cjs$1.IsInstance)(require_DidCommAttachment.DidCommAttachment, { each: true }),
	require_decorateMetadata.__decorateMetadata("design:type", Array)
], DidCommRequestPresentationV2Message.prototype, "requestAttachments", void 0);

//#endregion
exports.DidCommRequestPresentationV2Message = DidCommRequestPresentationV2Message;