import { j as jsxRuntimeExports } from "./chunks/jsx-runtime.CXYVdt5g.js";
import { u as useSectionStyle, a as usePageStyle } from "./chunks/use-section-style.D8_SY6rK.js";
import { B as BrickWrapper } from "./chunks/BrickWrapper.CKpu51yC.js";
import { r as useSections, a as usePage, B as useSiteAttributes, C as usePageAttributes } from "./chunks/use-editor.CurXdZnZ.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();
  usePage();
  const siteAttributes = useSiteAttributes();
  const pageAttributes = usePageAttributes();
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("title", { children: pageAttributes.title }),
    /* @__PURE__ */ jsxRuntimeExports.jsx("meta", { name: "description", content: pageAttributes.description }),
    /* @__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
