'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 itemAnalysis = new _ItemAnalysis2.default((0, _immutable.fromJS)({
  itemId: '3',
  itemBody: 'This is the item body',
  itemAnalysis: {
    scoreInfo: {
      resultSum: 5,
      resultCount: 1
    },
    unansweredInfo: 1,
    difficultyInfo: {
      responseCount: 5,
      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 quizAnalysis = new _QuizAnalysis2.default((0, _immutable.fromJS)({
  quizId: '1',
  quizAnalysis: {
    centile: Array.from({ length: 100 }, function () {
      return Math.floor(Math.random() * 5);
    }),
    decile: Array.from({ length: 10 }, function () {
      return Math.floor(Math.random() * 5);
    }),
    scoreInfo: {
      resultSum: 5,
      resultCount: 1
    }
  },
  batchTimestamp: new Date()
}));

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)([itemAnalysis]);
};
quiz.getQuizAnalysis = function () {
  return quizAnalysis;
};

exports.default = {
  permutations: [],
  renderProps: function renderProps(props) {
    return {
      componentProps: {
        quiz: quiz,
        openRows: {
          3: true
        },
        activeQuizId: '1',
        getExistingQuiz: Function.prototype,
        getItemAnalyses: Function.prototype,
        getQuizAnalysis: Function.prototype,
        toggleItemAnalysisRowExpanded: Function.prototype
      }
    };
  }
};