import { jsx } from "react/jsx-runtime";
import { privateApis as routerPrivateApis } from "@wordpress/router";
import { useSelect } from "@wordpress/data";
import Layout from "../layout";
import { useRegisterPostsAppRoutes } from "../posts-app-routes";
import { unlock } from "../../lock-unlock";
import { store as editSiteStore } from "../../store";
const { RouterProvider } = unlock(routerPrivateApis);
function PostsApp() {
  useRegisterPostsAppRoutes();
  const routes = useSelect((select) => {
    return unlock(select(editSiteStore)).getRoutes();
  }, []);
  return /* @__PURE__ */ jsx(RouterProvider, { routes, pathArg: "p", children: /* @__PURE__ */ jsx(Layout, {}) });
}
export {
  PostsApp as default
};
//# sourceMappingURL=index.js.map
