<script setup>
import { reactiveOmit } from "@vueuse/core";
import { Icon } from "@iconify/vue";
import { NumberFieldIncrement, useForwardProps } from "reka-ui";
import { cn } from "../../../utils/cn";
const props = defineProps({
  disabled: { type: Boolean, required: false },
  asChild: { type: Boolean, required: false },
  as: { type: null, required: false },
  class: { type: [Boolean, null, String, Object, Array], required: false, skipCheck: true }
});
const delegatedProps = reactiveOmit(props, "class");
const forwarded = useForwardProps(delegatedProps);
</script>

<template>
  <NumberFieldIncrement
    data-slot="increment"
    v-bind="forwarded"
    :class="cn('absolute top-1/2 -translate-y-1/2 right-0 disabled:cursor-not-allowed disabled:opacity-20 p-3', props.class)"
  >
    <slot>
      <Icon
        icon="radix-icons:plus"
        class="size-4"
      />
    </slot>
  </NumberFieldIncrement>
</template>
