"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.enabled = void 0;

var _lodash = _interopRequireDefault(require("lodash"));

var enabled = function enabled(config, env, defaultValue) {
  // if model.partialScoring = false
  //  - if env.partialScoring = false || env.partialScoring = true => use dichotomous scoring
  // else if model.partialScoring = true || undefined
  //  - if env.partialScoring = false, use dichotomous scoring
  //  - else if env.partialScoring = true, use partial scoring
  config = config || {};
  env = env || {};

  if (config.partialScoring === false) {
    return false;
  }

  if (env.partialScoring === false) {
    return false;
  }

  return _lodash["default"].isBoolean(defaultValue) ? defaultValue : true;
};

exports.enabled = enabled;
//# sourceMappingURL=partial-scoring.js.map