<template>
  <span class="ui-count">
    <UiIcon
      v-if="icon"
      :name="icon"
      size="16"
    />
    <slot/>
  </span>
</template>

<script setup lang="ts">
defineProps<{
  icon?: string
}>();
</script>

<style lang="scss">
.ui-count {
  @include font-sm;

  display: flex;
  align-items: center;
  min-width: 1lh;
  column-gap: 6px;
  color: $count-text;
  padding-block: 6px;
  padding-inline: 12px;
  background-color: $count-bg;
  border-radius: $radius;
}
</style>
