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

const role = inject('role') as string

defineProps<{ node: any }>()

const { groupList } = useGroup()
</script>

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