import { jsx as o } from "react/jsx-runtime";
import { useParams as P } from "react-router";
import s from "../ResponsiveContainer.js";
import { Post as i, PostProvider as u, PostConsumer as f } from "@devgateway/wp-react-lib";
const v = ({ header: e, footer: t, posts: r } = {}) => {
  const { lan: l, slug: n, parent: a, year: c, month: d, day: m } = P();
  return r ? /* @__PURE__ */ o(s, { header: e, footer: t, children: /* @__PURE__ */ o(i, { posts: typeof r == "object" ? [r] : r }) }) : (console.log("SlugPostContainer falling back to PostProvider"), /* @__PURE__ */ o(
    u,
    {
      type: a,
      slug: n,
      store: n,
      locale: l,
      year: c,
      month: d,
      day: m,
      children: /* @__PURE__ */ o(s, { header: e, footer: t, children: /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(i, {}) }) })
    }
  ));
};
export {
  v as default
};
