---

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

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

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

<Tag
  class={twMerge(
    "border-b border-faded-black [&>tr]:border-0 dark:border-manila-75",
    className,
  )}
  {...props}
>
  <slot />
</Tag>
