<script setup lang="ts">
import type { HTMLAttributes } from 'vue';
import { cn } from '@/lib/utils';

const props = defineProps<{
  class?: HTMLAttributes['class'];
  dataState?: 'selected';
}>();
</script>

<template>
  <tr
    data-slot="table-row"
    :data-state="props.dataState"
    :class="
      cn(
        'hover:bg-background-surface-muted-subtle has-[button:hover]:hover:bg-transparent data-[state=selected]:bg-background-surface-muted border-b transition-colors',
        props.class,
      )
    "
  >
    <slot />
  </tr>
</template>
