<script setup lang="ts">
import type { PrimitiveProps } from "reka-ui"
import type { HTMLAttributes } from "vue"
import type { StatusBadgeVariants } from "."
import { reactiveOmit } from "@vueuse/core"
import { Primitive } from "reka-ui"
import { cn } from "@/lib/utils"
import { statusBadgeVariants } from "."

const props = defineProps<PrimitiveProps & {
  variant?: StatusBadgeVariants["variant"]
  size?: StatusBadgeVariants['size']
  class?: HTMLAttributes["class"]
}>()

const delegatedProps = reactiveOmit(props, "class")
</script>

<template>
  <Primitive data-slot="badge" :class="cn(statusBadgeVariants({ variant, size }), props.class)" v-bind="delegatedProps">
    <span class="hidden lg:inline">
      <slot />
    </span>
    <span class="lg:hidden">
      &nbsp;
    </span>
  </Primitive>
</template>
