<script setup lang="ts">
import type { CalendarNextProps } from "reka-ui";
import type { HTMLAttributes } from "vue";
import { reactiveOmit } from "@vueuse/core";
import { CalendarNext, useForwardProps } from "reka-ui";
import { ChevronRight } from "lucide-vue-next";
import { buttonVariants } from "@/components/ui/Button.vue";
import { cn } from "@/lib/utils";

interface Props extends CalendarNextProps {
  class?: HTMLAttributes["class"];
}

const props = defineProps<Props>();
const delegatedProps = reactiveOmit(props, "class");
const forwarded = useForwardProps(delegatedProps);
</script>

<template>
  <CalendarNext
    data-slot="calendar-next-button"
    v-bind="forwarded"
    :class="
      cn(
        buttonVariants({ variant: 'outline' }),
        'size-7 bg-transparent p-0 opacity-50 hover:opacity-100',
        props.class,
      )
    "
  >
    <slot>
      <ChevronRight class="size-4" />
    </slot>
  </CalendarNext>
</template>
