<template>
  <t-tag :theme="theme" variant="light">{{ label }}</t-tag>
</template>

<script setup name="StatusTag">
import { computed } from 'vue';
import { getConfig } from './config';

const props = defineProps({
  value: { type: [Boolean, String, Number], default: '' },
  type: { type: String },
});

const { themeDict, valFilter } = getConfig(props.type);

const theme = computed(() => {
  return themeDict[props.value];
});
const label = computed(() => {
  return valFilter(props.value);
});
</script>
