"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Page = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const html_react_parser_1 = __importDefault(require("html-react-parser"));
const Article_1 = require("./Article");
const KeyframesContext_1 = require("../provider/KeyframesContext");
const Head_1 = require("./Head");
const Keyframes_1 = require("../provider/Keyframes");
const Page = ({ article, project, meta, keyframes, sectionData }) => {
    const afterBodyOpen = (0, html_react_parser_1.default)(project.html.afterBodyOpen);
    const beforeBodyClose = (0, html_react_parser_1.default)(project.html.beforeBodyClose);
    const keyframesRepo = (0, react_1.useMemo)(() => new Keyframes_1.Keyframes(keyframes), [keyframes]);
    return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Head_1.CNTRLHead, { project: project, meta: meta }), afterBodyOpen, (0, jsx_runtime_1.jsx)(KeyframesContext_1.KeyframesContext.Provider, { value: keyframesRepo, children: (0, jsx_runtime_1.jsx)(Article_1.Article, { article: article, sectionData: sectionData }) }), beforeBodyClose] }));
};
exports.Page = Page;
