"use strict";

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

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

var _immutable = require("immutable");

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

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

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

var itemAnalysis1 = new _ItemAnalysis.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 _ItemAnalysis.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 _QuizAnalysis.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 _Quiz.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;
};

var _default = {
  propValues: {
    quizMetrics: [[], ['highScore', 'lowScore', 'meanScore', 'meanElapsedTime', 'cronbachsAlpha'], ['standardDeviation', 'meanElapsedTime', 'cronbachsAlpha'], ['highScore', 'lowScore', 'meanScore'], ['cronbachsAlpha']],
    itemMetrics: [[], ['difficultyIndex', 'discriminationIndex', 'rpb', 'meanEarnedScore'], ['difficultyIndex', 'discriminationIndex'], ['difficultyIndex'], ['difficultyIndex', 'meanEarnedScore']]
  },
  getComponentProps: function getComponentProps(props) {
    return {
      animateDelay: 0,
      animateDuration: 0,
      quiz: quiz,
      quizAnalysis: quizAnalysis,
      openRows: {
        3: true
      },
      activeQuizId: '1',
      getExistingQuiz: Function.prototype,
      getItemAnalyses: Function.prototype,
      getQuizAnalysis: Function.prototype,
      quizAnalysisNotFound: false,
      toggleItemAnalysisRowExpanded: Function.prototype
    };
  }
};
exports.default = _default;