<script>"use strict";
import { getContext } from "svelte";
import { twMerge } from "tailwind-merge";
export let className = "";
export let role = "row";
export let ariaChecked = void 0;
export let disabled = false;
let section = getContext("table-section") || "body";
$: isSelectable = role === "checkbox" && !disabled;
</script>

<tr
	{role}
	aria-checked={ariaChecked}
	tabindex={disabled ? -1 : 0}
	class={twMerge('table-row align-middle outline-0 border-stone-200', className)}
	class:transition-colors={isSelectable}
	class:hover:bg-base-50={isSelectable && section === 'body'}
	class:focus:bg-blue-50={isSelectable && section === 'body'}
	class:opacity-30={disabled}
	class:border-b={section === 'body'}
	class:border-y={section === 'head'}
	class:bg-base-50={section === 'head'}
	{...$$restProps}
>
	<slot />
</tr>
