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

const props = defineProps<{ node: any }>()

const { getGroup } = useGroup()

const config = computed(() => {
  return props.node.data.teacher || {}
})

const group = computed(() => getGroup(config.value.group_id))

function paramsParse(data: any) {
  return { group_id: data.group_id }
}
</script>

<template>
  <RuleTemplate :node="node" step :paramsParse="paramsParse">
    <template #header-answer>
      <span class="is-answer">{{ group?.name }}</span>
    </template>
  </RuleTemplate>
</template>
