---

import type { HTMLTag, Polymorphic } from 'astro/types';
import { twMerge } from '@/utils/twMerge';

type Props<Tag extends HTMLTag = 'tbody'> = Polymorphic<{ as: Tag }> & {
  class?: string;
};

const { as: Tag = 'tbody', class: className, ...props } = Astro.props;
---

<Tag class={twMerge(className)} {...props}>
  <slot />
</Tag>
