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

<template>
  <ContextMenuSubTrigger
    data-slot="context-menu-sub-trigger"
    :data-inset="inset ? '' : void 0"
    v-bind="forwardedProps"
    :class="cn('focus:bg-[color-mix(in_srgb,var(--primary)_10%,white)] hover:bg-[color-mix(in_srgb,var(--primary)_10%,white)] focus:text-(--primary) hover:text-(--primary) data-[state=open]:bg-[color-mix(in_srgb,var(--primary)_10%,white)] data-[state=open]:text-(--primary) flex cursor-pointer items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class)"
  >
    <slot />
    <Icon
      icon="lucide:chevron-right"
      class="ml-auto size-4"
    />
  </ContextMenuSubTrigger>
</template>
