import { j as jsxRuntimeExports } from "./chunks/jsx-runtime.CXYVdt5g.js";
import { u as useSectionStyle, a as usePageStyle } from "./chunks/use-section-style.BVVfH7jL.js";
import { B as BrickWrapper } from "./chunks/BrickWrapper.CeTKjenq.js";
import { m as useSections, s as useSiteAttributes, t as usePageAttributes } from "./chunks/use-page-data.iZIVKDBc.js";
function Section({ section }) {
  const className = useSectionStyle({ section });
  return /* @__PURE__ */ jsxRuntimeExports.jsx("section", { id: section.id, "data-element-kind": "section", className, children: section.bricks.map((brick) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(BrickWrapper, { brick }, brick.id);
  }) }, section.id);
}
function Page() {
  const pageClassName = usePageStyle();
  const sections = useSections();
  const siteAttributes = useSiteAttributes();
  const pageAttributes = usePageAttributes();
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: pageClassName, children: [
    sections.map((section) => /* @__PURE__ */ jsxRuntimeExports.jsx(Section, { section }, section.id)),
    siteAttributes.bodyTags && // biome-ignore lint/security/noDangerouslySetInnerHtml: Enable raw HTML
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { dangerouslySetInnerHTML: { __html: siteAttributes.bodyTags } }),
    pageAttributes.additionalTags?.bodyTags && // biome-ignore lint/security/noDangerouslySetInnerHtml: Enable raw HTML
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { dangerouslySetInnerHTML: { __html: pageAttributes.additionalTags.bodyTags } })
  ] });
}
export {
  Page as default
};
//# sourceMappingURL=Page.js.map
