const require_rolldown_runtime = require('../../../../../../../../_virtual/rolldown_runtime.js');
const require_ValidationMetadata$1 = require('../../metadata/ValidationMetadata.js');
const require_MetadataStorage$1 = require('../../metadata/MetadataStorage.js');
const require_ValidationTypes$1 = require('../../validation/ValidationTypes.js');

//#region ../../node_modules/.pnpm/class-validator@0.14.1/node_modules/class-validator/cjs/decorator/common/ValidateNested.js
var require_ValidateNested = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/class-validator@0.14.1/node_modules/class-validator/cjs/decorator/common/ValidateNested.js": ((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	const ValidationTypes_1 = require_ValidationTypes$1.require_ValidationTypes();
	const ValidationMetadata_1 = require_ValidationMetadata$1.require_ValidationMetadata();
	const MetadataStorage_1 = require_MetadataStorage$1.require_MetadataStorage();
	/**
	* Objects / object arrays marked with this decorator will also be validated.
	*/
	function ValidateNested(validationOptions) {
		const opts = { ...validationOptions };
		const eachPrefix = opts.each ? "each value in " : "";
		opts.message = opts.message || eachPrefix + "nested property $property must be either object or array";
		return function(object, propertyName) {
			const args = {
				type: ValidationTypes_1.ValidationTypes.NESTED_VALIDATION,
				target: object.constructor,
				propertyName,
				validationOptions: opts
			};
			(0, MetadataStorage_1.getMetadataStorage)().addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args));
		};
	}
	exports.ValidateNested = ValidateNested;
}) });

//#endregion
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function () {
    return require_ValidateNested();
  }
});