<script setup lang="ts">
import { DropdownMenuItem, type DropdownMenuItemProps } from "reka-ui";
import { cn } from "@/lib/utils";

interface Props extends DropdownMenuItemProps {
  class?: string;
  inset?: boolean;
}

const props = defineProps<Props>();
</script>

<template>
  <DropdownMenuItem
    v-bind="props"
    :class="
      cn(
        'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
        inset && 'pl-8',
        props.class,
      )
    "
  >
    <slot />
  </DropdownMenuItem>
</template>
