import { jsx, jsxs, Fragment } from "react/jsx-runtime";
import { u as useSectionStyle, a as usePageStyle } from "./chunks/use-section-style.DjjgfIQS.js";
import { B as BrickWrapper } from "./chunks/BrickWrapper.DbYQbPM-.js";
import { p as useSections, w as useSiteAttributes, x as usePageAttributes } from "./chunks/use-page-data.CMUQyNAA.js";
function Section({ section }) {
  const className = useSectionStyle({ section });
  return /* @__PURE__ */ jsx("section", { id: section.id, "data-element-kind": "section", className, children: section.bricks.map((brick) => {
    return /* @__PURE__ */ jsx(BrickWrapper, { brick }, brick.id);
  }) }, section.id);
}
function Page() {
  const pageClassName = usePageStyle();
  const sections = useSections();
  const siteAttributes = useSiteAttributes();
  const pageAttributes = usePageAttributes();
  return /* @__PURE__ */ jsxs(Fragment, { children: [
    /* @__PURE__ */ jsx("title", { children: pageAttributes.title }),
    /* @__PURE__ */ jsx("meta", { name: "description", content: pageAttributes.description }),
    /* @__PURE__ */ jsxs("div", { className: pageClassName, children: [
      sections.map((section) => /* @__PURE__ */ jsx(Section, { section }, section.id)),
      siteAttributes.bodyTags && // biome-ignore lint/security/noDangerouslySetInnerHtml: Enable raw HTML
      /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: siteAttributes.bodyTags } }),
      pageAttributes.additionalTags?.bodyTags && // biome-ignore lint/security/noDangerouslySetInnerHtml: Enable raw HTML
      /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: pageAttributes.additionalTags.bodyTags } })
    ] })
  ] });
}
export {
  Page as default
};
//# sourceMappingURL=Page.js.map
