<script setup lang="ts">
import type { HTMLAttributes } from "vue"
import type { AlertVariants } from "."
import { cn } from "@/lib/utils"
import { alertVariants } from "."

export interface AlertProps {
  variant?: AlertVariants["variant"]
  class?: HTMLAttributes["class"]
}

const props = defineProps<AlertProps>()
</script>

<template>
  <div role="alert" :class="cn(alertVariants({ variant }), props.class)">
    <slot />
  </div>
</template>
