import * as constants from 'constants/QuestionConstants';

var QuestionActions = {
	getQuizDetails: function(data){
		return {
      type: constants.QUESTION_GETQUIZDETAILS,
      data : data
    };
	},
	getPresentQuestion: function(data){
		return {
      type: constants.QUESTION_GETNEXTQUESTION,
      data : data
    };
	},
	goToNextQuestion: function(){
		return {
      type: constants.QUESTION_GOTONEXTQUESTION
    };
	},
  setCurrentQuestionCount: function(){
    return {
      type: constants.QUESTION_SETCURRENTQUESTIONCOUNT
    };
  },
  setIsWritingExam: function(isWritingExam){
    return {
      type: constants.QUESTION_SETISWRITINGEXAM,
      isWritingExam: isWritingExam
    };
  },
  storeCurrentQuestionAnswer: function(answer){
    return {
      type: constants.QUESTION_STOREANSWER,
      answer: answer
    };
  },
  storeCurrentLeaderBoardIdAndKontest: function(currentKontest, currentLeaderBoardId){
    return {
      type: constants.STORE_CURRENT_LEADERBOARDID_AND_KONTEST,
      currentLeaderBoardId: currentLeaderBoardId,
      currentKontest: currentKontest
    };
  },
  storeCurrentKontestIdAndKontest: function(currentKontestId){
    return {
      type: constants.STORE_CURRENT_KONTESTID_AND_KONTEST,
      currentKontestId: currentKontestId
    };
  },
  resetCurrentCountIndex: function(){
    return {
      type: constants.RESET_CURRENT_COUNT_INDEX
    };
  },
	updateCompletionStatus:function(){
		return {
      type:constants.QUESTION_UPDATECOMPLETIONSTATUS
    };
	}
};

module.exports = QuestionActions;
