"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 _default = {
  permutations: [{
    isEditing: [true, false],
    errorsShowing: [true, false],
    errors: [[], ['This is bad']]
  }],
  renderProps: function renderProps(props) {
    var quiz = new _Quiz.default((0, _immutable.fromJS)({
      id: 1,
      title: 'My Super Duper Quiz',
      errors: {
        title: props.errors
      }
    }));
    return {
      componentProps: {
        changeQuizTitle: Function.prototype,
        errorsShowing: (0, _immutable.fromJS)({
          quiz_title_edit: props.errorsShowing
        }),
        hideError: Function.prototype,
        onQuizUpdated: Function.prototype,
        saveQuizChange: Function.prototype,
        screenreaderNotification: Function.prototype,
        scrollKey: 'scrollKey',
        showError: Function.prototype,
        switchOffEditing: Function.prototype,
        // injected by makeEditable
        switchOnEditing: Function.prototype,
        // injected by makeEditable
        quiz: quiz,
        workingQuiz: quiz
      },
      filter: props.errorsShowing == false && props.errors.length > 0 || props.isEditing == false && (props.errorsShowing || props.errors.length > 0)
    };
  }
};
exports.default = _default;