---
import type { CollectionEntry } from 'astro:content'
import Block from 'fulldev-blocks/components/Block.astro'
import Blocks from 'fulldev-blocks/components/Blocks.astro'
import MainLayout from 'fulldev-blocks/layouts/MainLayout.astro'
import { Prose, Section } from 'fulldev-ui'

type Props = CollectionEntry<'pages'>

const { data, render } = Astro.props
const { hero, section, sections, block, blocks } = data
const { Content } = await render()
---

<MainLayout {...Astro.props}>
  <Block
    _bookshop_name="ProductSection"
    {...data}
  />
  <Block {...section} />
  <Block {...block} />
  <Section
    size="lg"
    style={{ '--screen': '768px' }}
  >
    <Prose id="prose">
      <Content />
    </Prose>
  </Section>
  <Blocks {...sections} />
  <Blocks {...blocks} />
  <slot />
</MainLayout>
