<template>
  <div class="x-env-flag">
    {{type.toUpperCase()}}
  </div>
</template>

<script>
export default {
  name: 'XEnvFlag',
  props: {
    type: {
      type: String,
      required: true
    }
  },
  mounted() {
    document.body.appendChild(this.$el);
  },
  beforeDestroy() {
    if (this.$el && this.$el.parentNode) {
      this.$el.parentNode.removeChild(this.$el);
    }
  }
};
</script>
