<script setup lang="ts">
type BadgeSize = 'sm' | 'md' | 'lg'
type BadgeStyle = 'normal' | 'positive' | 'warning' | 'negative'

defineProps<{ size?: BadgeSize; color?: BadgeStyle }>()
</script>
<template>
  <span
    class="app-badge"
    :class="{
      'app-badge-sm': size === 'sm',
      'app-badge-lg': size === 'lg',
    }"
  >
    <slot></slot>
  </span>
</template>
<style lang="css">
.app-badge {
  padding: 0.1rem 0.5rem;
  border-radius: 0.5rem;
  background-color: var(--bg-lighter);
  font-size: 0.9rem;
  border: 1px solid var(--text-muted);
  display: inline-block;
}

.app-badge + .app-badge {
  margin-left: 0.25rem;
}

.app-badge-sm {
  padding: 0.1rem 0.25rem;
  border-radius: 0.3rem;
  font-size: 0.75rem;
}

.app-badge-lg {
  padding: 0.3rem 0.6rem;
  border-radius: 0.6rem;
  font-size: 1rem;
}
</style>
