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/ValidateIf.js
var require_ValidateIf = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/class-validator@0.14.1/node_modules/class-validator/cjs/decorator/common/ValidateIf.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();
	/**
	* Ignores the other validators on a property when the provided condition function returns false.
	*/
	function ValidateIf(condition, validationOptions) {
		return function(object, propertyName) {
			const args = {
				type: ValidationTypes_1.ValidationTypes.CONDITIONAL_VALIDATION,
				target: object.constructor,
				propertyName,
				constraints: [condition],
				validationOptions
			};
			(0, MetadataStorage_1.getMetadataStorage)().addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args));
		};
	}
	exports.ValidateIf = ValidateIf;
}) });

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