<script setup lang="tsx">
import { PropType, ref } from 'vue'
import { TableData } from '@/api/dataset/IndexCategory/types'
import { Descriptions, DescriptionsSchema } from '@/components/Descriptions'
import { TYPE_DICT_LIST, COMMON_DICT_LIST, STATUS_DICT_LIST } from '../constants'

const detailSchema = ref<DescriptionsSchema[]>([
  {
      field: 'dicid',
      label: '分类编号'
    },
    {
      field: 'dicname',
      label: '分类名称'
    },
    {
      field: 'dicvalue',
      label: '分类值'
    },
    {
      field: 'parentname',
      label: '上级分类'
    },
    {
      field: 'description',
      label: '分类描述'
    },
    {
      field: 'status',
      label: '分类状态'
    }
])

defineProps({
  currentRow: {
    type: Object as PropType<TableData>,
    default: () => {}
  }
})
</script>

<template>
  <Descriptions :schema="detailSchema" :data="currentRow || {}" />
</template>
