import { isEnable } from '@/views/exercise_questions/data/common';

import SelectPreview from '@/views/exercise_questions/preview/SelectPreview.vue';
import JudgePreview from '@/views/exercise_questions/preview/JudgePreview.vue';
import MatchingPreview from '@/views/exercise_questions/preview/MatchingPreview.vue';
import ChinesePreview from '@/views/exercise_questions/preview/ChinesePreview.vue';
import WritePreview from '../preview/WritePreview.vue';
import FillPreview from '../preview/FillPreview.vue';
import ReadAloudPreview from '../preview/ReadAloudPreview.vue';
import DialoguePreview from '../preview/DialoguePreview.vue';
import TalkPictruePreview from '../preview/TalkPictruePreview.vue';
import ChooseTonePreview from '../preview/ChooseTonePreview.vue';
import RepeatPreview from '../preview/RepeatPreview.vue';
import ReadPreview from '../preview/ReadPreview.vue';
import SortPreview from '../preview/SortPreview.vue';
import ListenSelectPreview from '../preview/ListenSelectPreview.vue';
import ListenFillPreview from '../preview/ListenFillPreview.vue';
import ListenJudgePreview from '../preview/ListenJudgePreview.vue';
import WordCardPreview from '../preview/WordCardPreview.vue';
import AnswerQuestionPreview from '../preview/AnswerQuestionPreview.vue';
import WritePictruePreview from '../preview/WritePictruePreview.vue';
import ReplaceAnswerPreview from '../preview/ReplaceAnswerPreview.vue';
import EssayQuestionPreview from '../preview/EssayQuestionPreview.vue';
import TableFillPreview from '../preview/TableFillPreview.vue';
import WordDictationPreview from '../preview/WordDictationPreview.vue';
import ActivityPreviewVue from '../preview/ActivityPreview.vue';

const PreviewQuestionTypeMixin = {
  data() {
    return {
      isEnable,
      previewComponents: {
        select: SelectPreview,
        judge: JudgePreview,
        matching: MatchingPreview,
        chinese: ChinesePreview,
        write: WritePreview,
        fill: FillPreview,
        read_aloud: ReadAloudPreview,
        dialogue: DialoguePreview,
        talk_picture: TalkPictruePreview,
        choose_tone: ChooseTonePreview,
        repeat: RepeatPreview,
        read: ReadPreview,
        sort: SortPreview,
        listen_select: ListenSelectPreview,
        listen_fill: ListenFillPreview,
        listen_judge: ListenJudgePreview,
        word_card: WordCardPreview,
        answer_question: AnswerQuestionPreview,
        write_picture: WritePictruePreview,
        replace_answer: ReplaceAnswerPreview,
        essay_question: EssayQuestionPreview,
        table_fill: TableFillPreview,
        word_dictation: WordDictationPreview,
        activity: ActivityPreviewVue,
      },
    };
  },
};

export default PreviewQuestionTypeMixin;
