<template>
  <div class="tag-group">
    <slot>
      <a-tag
        v-for="(tag, index) in options"
        :key="index"
        :color="tag.color"
      >
        {{ tag.label }}
      </a-tag>
    </slot>
  </div>
</template>

<script>
export default {
  props: {
    options: {
      type: Array,
      required: true,
      default: () => []
    }
  }
}
</script>

<style scoped lang="less">
.tag-group {
  display: flex;
}

.tag-group .ant-tag {
  border-radius: 5px;
  margin-right: 0px;
  min-width: 1.5rem;
  min-height: 1rem;
}

.tag-group .ant-tag:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.tag-group .ant-tag:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.tag-group .ant-tag:not(:first-child):not(:last-child) {
  border-radius: 0;
}
</style>
