text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  const constants_1 = require("../constants");
  const decorators_1 = require("../decorators");
  const model_properties_accessor_1 = require("../services/model-properties-accessor");
  const type_helpers_utils_1 = require("./type-helpers.utils");
  const modelPropertiesAccessor = new model_properties_accessor_1.ModelPropertiesAccessor();
  function PickType(classRef, keys) {
      const fields = modelPropertiesAccessor
          .getModelProperties(classRef.prototype)
          .filter((item) => keys.includes(item));
      class PickTypeClass {
      }
      const isInheritedPredicate = (propertyKey) => keys.includes(propertyKey);
      type_helpers_utils_1.inheritValidationMetadata(classRef, PickTypeClass, isInheritedPredicate);
      type_helpers_utils_1.inheritTransformationMetadata(classRef, PickTypeClass, isInheritedPredicate);
      fields.forEach((propertyKey) => {
          const metadata = Reflect.getMetadata(constants_1.DECORATORS.API_MODEL_PROPERTIES, classRef.prototype, propertyKey);
          const decoratorFactory = decorators_1.ApiProperty(metadata);
          decoratorFactory(PickTypeClass.prototype, propertyKey);
      });
      return PickTypeClass;
  }
  exports.PickType = PickType;
  