<script setup lang="ts">
import ConfigViewTemplate from '../../ConfigViewTemplate.vue'
import { useMetaEvent } from '../../../composables/useAllData'

const role = inject('role') as string

defineProps<{ node: any }>()

const { metaEventList } = useMetaEvent()
</script>

<template>
  <ConfigViewTemplate :node="node">
    <el-form-item :label="role === 'student' ? '我的答案' : '学生答案'">
      {{ metaEventList.find(c => c.id === node.data.student?.event_id)?.name }}
    </el-form-item>
    <el-form-item label="正确答案">
      {{ metaEventList.find(c => c.id === node.data.teacher?.event_id)?.name }}
    </el-form-item>
  </ConfigViewTemplate>
</template>
