'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _immutable = require('immutable');

var _Quiz = require('../../../../common/records/Quiz');

var _Quiz2 = _interopRequireDefault(_Quiz);

var _ItemAnalysis = require('../../../../common/records/ItemAnalysis');

var _ItemAnalysis2 = _interopRequireDefault(_ItemAnalysis);

var _QuizAnalysis = require('../../../../common/records/QuizAnalysis');

var _QuizAnalysis2 = _interopRequireDefault(_QuizAnalysis);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var itemAnalysis1 = new _ItemAnalysis2.default((0, _immutable.fromJS)({
  itemId: '3',
  itemBody: 'This is the item body',
  itemAnalysis: {
    scoreInfo: {
      resultSum: 3,
      resultCount: 1,
      scoreStddevPop: 1.2
    },
    correctAnswerInfo: {
      resultSum: 50,
      resultCount: 8,
      appearedCount: 20
    },
    topCorrectAnswerInfo: {
      resultCount: 8,
      appearedCount: 20
    },
    bottomCorrectAnswerInfo: {
      resultCount: 2,
      appearedCount: 20
    },
    incorrectAnswerInfo: {
      resultSum: 5,
      resultCount: 8
    },
    unansweredInfo: 1,
    difficultyInfo: {
      responseCount: 8,
      correctAnswerCount: 1
    },
    choiceInfo: [{
      choiceCount: 2,
      id: 'id',
      itemBody: '<p>Item&gt;Body</p>',
      correct: true
    }, {
      choiceCount: 3,
      id: 'not_id',
      itemBody: 'choice Item Body not correct',
      correct: false
    }, {
      choiceCount: 4,
      id: 'not_id_again',
      itemBody: 'choice Item Body not correct still',
      correct: false
    }],
    quintile: [1, 2, 3, 4, 5]
  }
}));

var itemAnalysis2 = new _ItemAnalysis2.default((0, _immutable.fromJS)({
  itemId: '5',
  itemBody: 'This is another item body',
  itemAnalysis: {
    scoreInfo: {
      resultSum: 3,
      resultCount: 1,
      scoreStddevPop: 1.2
    },
    correctAnswerInfo: {
      resultSum: 50,
      resultCount: 8,
      appearedCount: 20
    },
    topCorrectAnswerInfo: {
      resultCount: 8,
      appearedCount: 20
    },
    bottomCorrectAnswerInfo: {
      resultCount: 2,
      appearedCount: 20
    },
    incorrectAnswerInfo: {
      resultSum: 5,
      resultCount: 8
    },
    unansweredInfo: 1,
    difficultyInfo: {
      responseCount: 8,
      correctAnswerCount: 1
    },
    choiceInfo: [{
      choiceCount: 2,
      id: 'id',
      itemBody: '<p>Item&gt;Body</p>',
      correct: true
    }, {
      choiceCount: 3,
      id: 'not_id',
      itemBody: 'choice Item Body not correct',
      correct: false
    }, {
      choiceCount: 4,
      id: 'not_id_again',
      itemBody: 'choice Item Body not correct still',
      correct: false
    }],
    quintile: [1, 2, 1, 3, 4]
  }
}));

var quizAnalysis = new _QuizAnalysis2.default((0, _immutable.fromJS)({
  quizId: '1',
  quizAnalysis: {
    centile: Array.from({ length: 101 }, function (v, i) {
      return i / 100;
    }),
    decile: Array.from({ length: 10 }, function (v, i) {
      return i;
    }),
    scoreInfo: {
      resultSum: 5,
      resultCount: 1,
      scoreMax: 100,
      scoreMin: 2,
      scoreSum: 1000,
      scoreCount: 40,
      pointsPossible: 100,
      scoreStddevPop: 20
    },
    cronbachsAlpha: 5
  },
  batchTimestamp: new Date('Thu Feb 07 2019 15:35:17 GMT-0500 (Eastern Standard Time)')
}));

var quiz = new _Quiz2.default((0, _immutable.fromJS)({
  id: 1
}));

// TODO: Remove this hackery once we get redux out of our records...
quiz.getItemAnalyses = function () {
  return (0, _immutable.List)([itemAnalysis1, itemAnalysis2]);
};
quiz.getQuizAnalysis = function () {
  return quizAnalysis;
};

exports.default = {
  permutations: [{
    quizMetrics: [[], ['highScore', 'lowScore', 'meanScore', 'meanElapsedTime', 'cronbachsAlpha'], ['standardDeviation', 'meanElapsedTime', 'cronbachsAlpha'], ['highScore', 'lowScore', 'meanScore'], ['cronbachsAlpha']]
  }, {
    itemMetrics: [[], ['difficultyIndex', 'discriminationIndex', 'rpb', 'meanEarnedScore'], ['difficultyIndex', 'discriminationIndex'], ['difficultyIndex'], ['difficultyIndex', 'meanEarnedScore']]
  }],
  renderProps: function renderProps(props) {
    return {
      componentProps: {
        quiz: quiz,
        quizAnalysis: quizAnalysis,
        openRows: {
          3: true
        },
        activeQuizId: '1',
        getExistingQuiz: Function.prototype,
        getItemAnalyses: Function.prototype,
        getQuizAnalysis: Function.prototype,
        toggleItemAnalysisRowExpanded: Function.prototype
      }
    };
  }
};