<script setup lang="ts">
import { computed } from 'vue'
import { storeToRefs } from 'pinia'
import { useResearchTypesStore } from '../../stores/researchTypes'
import CategoryItemList from '../CategoryItemList.vue'

const store = useResearchTypesStore()
const { types } = storeToRefs(store)

const rows = computed(() =>
  Object.entries(types.value).map(([id, t]) => ({ id, display_name: t.display_name, description: t.description }))
)
</script>

<template>
  <CategoryItemList category="research" :rows="rows" />
</template>
