import { jsx as e } from "react/jsx-runtime";
import c from "../ResponsiveContainer.js";
import { PageProvider as p, PageConsumer as m, Page as v } from "@devgateway/wp-react-lib";
import { useLocation as w, useParams as P } from "react-router";
const f = ({ header: o, footer: i }) => {
  const n = w(), { id: t } = P(), r = new URLSearchParams(n.search), a = r.get("preview"), s = r.get("_wpnonce");
  return /* @__PURE__ */ e(c, { header: o, footer: i, children: /* @__PURE__ */ e(
    p,
    {
      store: "preview",
      perPage: 1,
      view: a,
      previewNonce: s,
      previewId: t,
      children: /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(v, { preview: !0 }) })
    }
  ) });
};
export {
  f as default
};
