

const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
const require_decorateMetadata = require('../../../../_virtual/_@oxc-project_runtime@0.97.0/helpers/decorateMetadata.js');
const require_decorate = require('../../../../_virtual/_@oxc-project_runtime@0.97.0/helpers/decorate.js');
const require_JsonTransformer = require('../../../../utils/JsonTransformer.js');
const require_validators = require('../../../../utils/validators.js');
require('../../../../utils/index.js');
const require_constants = require('../../constants.js');
const require_validators$1 = require('../../validators.js');
const require_W3cJsonLdVerifiableCredential = require('../../data-integrity/models/W3cJsonLdVerifiableCredential.js');
const require_W3cJwtVerifiableCredential = require('../../jwt-vc/W3cJwtVerifiableCredential.js');
const require_W3cVerifiableCredential = require('../credential/W3cVerifiableCredential.js');
const require_W3cHolder = require('./W3cHolder.js');
let class_transformer = require("class-transformer");
let class_validator = require("class-validator");

//#region src/modules/vc/models/presentation/W3cPresentation.ts
var _ref, _ref2;
var W3cPresentation = class {
	constructor(options) {
		if (options) {
			this.id = options.id;
			this.context = options.context ?? [require_constants.CREDENTIALS_CONTEXT_V1_URL];
			this.type = options.type ?? [require_constants.VERIFIABLE_PRESENTATION_TYPE];
			this.verifiableCredential = options.verifiableCredential;
			if (options.holder) this.holder = typeof options.holder === "string" ? options.holder : new require_W3cHolder.W3cHolder(options.holder);
		}
	}
	get holderId() {
		if (!this.holder) return null;
		return this.holder instanceof require_W3cHolder.W3cHolder ? this.holder.id : this.holder;
	}
	toJSON() {
		return require_JsonTransformer.JsonTransformer.toJSON(this);
	}
};
require_decorate.__decorate([
	(0, class_transformer.Expose)({ name: "@context" }),
	require_validators$1.IsCredentialJsonLdContext(),
	require_decorateMetadata.__decorateMetadata("design:type", typeof (_ref = typeof Array !== "undefined" && Array) === "function" ? _ref : Object)
], W3cPresentation.prototype, "context", void 0);
require_decorate.__decorate([
	(0, class_validator.IsOptional)(),
	require_validators.IsUri(),
	require_decorateMetadata.__decorateMetadata("design:type", String)
], W3cPresentation.prototype, "id", void 0);
require_decorate.__decorate([require_validators$1.IsVerifiablePresentationType(), require_decorateMetadata.__decorateMetadata("design:type", typeof (_ref2 = typeof Array !== "undefined" && Array) === "function" ? _ref2 : Object)], W3cPresentation.prototype, "type", void 0);
require_decorate.__decorate([
	require_W3cHolder.W3cHolderTransformer(),
	require_W3cHolder.IsW3cHolder(),
	(0, class_validator.IsOptional)(),
	require_decorateMetadata.__decorateMetadata("design:type", Object)
], W3cPresentation.prototype, "holder", void 0);
require_decorate.__decorate([
	require_W3cVerifiableCredential.W3cVerifiableCredentialTransformer(),
	require_validators.IsInstanceOrArrayOfInstances({ classType: [require_W3cJsonLdVerifiableCredential.W3cJsonLdVerifiableCredential, require_W3cJwtVerifiableCredential.W3cJwtVerifiableCredential] }),
	(0, class_validator.ValidateNested)({ each: true }),
	require_decorateMetadata.__decorateMetadata("design:type", Object)
], W3cPresentation.prototype, "verifiableCredential", void 0);

//#endregion
exports.W3cPresentation = W3cPresentation;