<script setup lang="ts">
import type { AvatarImageProps } from "reka-ui"
import type { HTMLAttributes } from "vue"
import { reactiveOmit } from "@vueuse/core"
import { AvatarImage } from "reka-ui"
import { cn } from "@/lib/utils"

export interface AvatarImageWrapperProps extends AvatarImageProps {
  class?: HTMLAttributes["class"]
}

const props = defineProps<AvatarImageWrapperProps>()
const delegatedProps = reactiveOmit(props, "class")
</script>

<template>
  <AvatarImage
    v-bind="delegatedProps"
    :class="cn('h-full w-full object-cover', props.class)"
  />
</template>
