<script lang="ts">
  import { getBlockLayoutClasses } from "../../lib/block-layout";
  import type { HtmlBlockData } from "../../lib/block-types";

  let { block }: { block: HtmlBlockData } = $props();

  const layoutClasses = $derived(getBlockLayoutClasses(block.layout));
</script>

<div
  class="{layoutClasses} content-html"
  data-block-type="html"
  data-block-slug={block._slug}
>
  {@html block.html ?? ""}
</div>
