import React from 'react'; import Block from "./blocks/Block"; import Html from "./helper/Html"; import Navigation from "./Navigation"; import SummaryDetails from "./blocks/SummaryDetails"; import { Heading, Paragraphs, Grid } from "../primitives"; import { RenderableNode } from "../index"; import { hasProperty } from "../utils/is-of-type"; type Props = { children: RenderableNode[], debug?: boolean, details?: string, firstPage: boolean, lastPage: boolean, heading?: string, lead?: string, nextPage: () => void, pageid: string, nextPageIsResult: boolean, previousPage: () => void, summary?: string, } export default function Page({ children = [], debug = false, details = "", firstPage, lastPage, heading = "Missing page heading", lead = "", nextPage, nextPageIsResult, pageid, previousPage, summary = "", }: Props) { return ( {heading} {lead && } {summary && } {children.map((block, index) => ( ))} {(!firstPage || !lastPage) && ( )} ); }