<template>
  <el-tag v-if="config" :type="config.type" :color="config.color" size="small">
    {{ t(config.label) }}
  </el-tag>
  <span v-else>-</span>
</template>

<script setup lang="ts">
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { getDocumentStatusConfig } from '@/enums/documentStatus';

interface Props {
  status: number;
}

const props = defineProps<Props>();
const { t } = useI18n();

const config = computed(() => getDocumentStatusConfig(props.status));
</script>
