import { ref } from "vue"
import SingleChoiceIcon from "@/assets/evaluateTeaching/SingleChoiceIcon.vue"
import QAIcon from "@/assets/evaluateTeaching/Q&AIcon.vue"
import MultipleChoiceIcon from "@/assets/evaluateTeaching/MultipleChoiceIcon.vue"
import EvaluateScoreIcon from "@/assets/evaluateTeaching/EvaluateScoreIcon.vue"

interface QuestionTypeItm {
    label:String,
    value:String,
    icon:null | any,
    activeIcon?:String
}

export const statisticQuestionType = ref<QuestionTypeItm[]>([
    {
        label:'单选题',
        value:'0',
        icon:SingleChoiceIcon,
    },
    {
        label:'多选题',
        value:'1',
        icon:MultipleChoiceIcon,
    },
    {
        label:'问答题',
        value:'2',
        icon:QAIcon,
    },
])

export const scoredQuestionType = ref<QuestionTypeItm[]>([
    {
        label:'评分单选题',
        value:'3',
        icon:SingleChoiceIcon,
    },
    {
        label:'评价题',
        value:'5',
        icon:EvaluateScoreIcon,
    },
])

export const qustionTypeToName = (type)=>{
    switch(Number(type)){
        case 0:
            return '单选题'
        case 1:
            return '多选题'
        case 2:
            return '问答题'
        case 3:
            return '评分单选题'
        case 5:  //4
            return '评价题'
    }
}
