<script setup>
import { cn } from "../../../utils/cn";
import { Primitive, useForwardPropsEmits } from "reka-ui";
import { buttonVariants } from ".";
defineOptions({
  name: "UiButton"
});
const props = defineProps({
  variant: { type: null, required: false },
  size: { type: null, required: false },
  class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true },
  asChild: { type: Boolean, required: false },
  as: { type: null, required: false, default: "button" }
});
const emits = defineEmits(["click"]);
const forwarded = useForwardPropsEmits(props, emits);
</script>

<template>
  <Primitive
    data-slot="button"
    :data-variant="variant"
    v-bind="forwarded"
    :class="cn(buttonVariants({ variant, size }), props.class)"
  >
    <slot />
  </Primitive>
</template>
