---
import NotionBlocks from '../NotionBlocks.astro'
import type * as interfaces from '../../lib/interfaces'

export interface Props {
  block: interfaces.Block
  headings: interfaces.Block[]
}

const { block, headings }: Props = Astro.props

if (!block.SyncedBlock || !block.SyncedBlock.Children) {
  return null
}
---

<NotionBlocks blocks={block.SyncedBlock.Children} headings={headings} />
