<template>
  <div class="order-status">
    <SvgIcon
      icon-class="circle"
      :style="{ color: statusDict[value].color || '#000' }"
    />
    {{ statusDict[value].name || '--' }}
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: String,
      default: null
    }
  },
  computed: {
    statusDict() {
      return this.$store.getters.orderStatusDict
    }
  }
}
</script>

<style scoped lang="scss">
.order-status {
  height: 24px;
  line-height: 24px;

  .svg-icon {
    margin: -2px 2px 0 0;
    height: 24px;
  }
}
</style>
