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

<template>
  <RadioGroupItem
    data-slot="radio-group-item"
    v-bind="forwarded"
    :class="cn(
  'peer cursor-pointer flex items-center justify-center border-zinc-200 data-[state=checked]:border-(--primary) aria-invalid:border-red-400 size-4 shrink-0 rounded-full border shadow-xs hover:shadow transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50',
  props.class
)"
  >
    <RadioGroupIndicator
      data-slot="radio-group-indicator"
      class="grid h-full w-full place-content-center"
    >
      <span class="size-2 rounded-full bg-(--primary)" />
    </RadioGroupIndicator>
  </RadioGroupItem>
</template>
