<template>
  <a-tag :color="meta.color" size="small">{{ meta.label }}</a-tag>
</template>

<script setup>
import { computed } from 'vue'
import { getWorkOrderStateMeta } from '@/utils/workOrderTemplates'

const props = defineProps({
  state: { type: Number, required: true }
})

const meta = computed(() => getWorkOrderStateMeta(props.state))
</script>
