<script setup>
import { Icon } from "@iconify/vue";
import { reactiveOmit } from "@vueuse/core";
import {
  NavigationMenuTrigger,
  useForwardProps
} from "reka-ui";
import { cn } from "../../../utils/cn";
import { navigationMenuTriggerStyle } from ".";
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 forwardedProps = useForwardProps(delegatedProps);
</script>

<template>
  <NavigationMenuTrigger
    data-slot="navigation-menu-trigger"
    v-bind="forwardedProps"
    :class="cn(navigationMenuTriggerStyle(), 'group', props.class)"
  >
    <slot />
    <Icon
      icon="fluent:chevron-down-20-regular"
      class="relative top-0.5 ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180"
      aria-hidden="true"
    />
  </NavigationMenuTrigger>
</template>
