<script>import { getCtx } from "../ctx.js";
export let date;
export let asChild = false;
export let el = void 0;
const {
  helpers: { isDateDisabled, isDateUnavailable },
  getCalendarAttrs
} = getCtx();
$:
  attrs = {
    ...getCalendarAttrs("cell"),
    "aria-disabled": $isDateDisabled(date) || $isDateUnavailable(date),
    "data-disabled": $isDateDisabled(date) ? "" : void 0,
    role: "gridcell"
  };
</script>

{#if asChild}
	<slot {attrs} />
{:else}
	<td bind:this={el} {...$$restProps} {...attrs}>
		<slot {attrs} />
	</td>
{/if}
