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

const { getConnection } = useConnection()

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

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

const connection = computed(() => {
  return getConnection(config.value?.connection_id)
})
</script>

<template>
  <RuleTemplate :node="node" step>
    <template #header-answer>
      连接：<span class="is-answer">{{ connection?.name }}</span> &nbsp;&nbsp; 事件：<span class="is-answer"
        >关注公众号</span
      >
    </template>
  </RuleTemplate>
</template>
