import {
  PostList_default
} from "./chunk-FCWXZZIF.mjs";
import {
  HeaderContainer,
  RootContainer
} from "./chunk-NDE7AMCP.mjs";

// tmp-babel/content-feed/web/ContentFeed/index.js
import { useCallback } from "react";
import { Button, Typography } from "@mui/material";
import { useRouter } from "next/navigation";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var ContentFeed = function ContentFeed2(_ref) {
  var preloadedQuery = _ref.preloadedQuery;
  var router = useRouter();
  var onNewPost = useCallback(function() {
    router.push("/posts/new");
  }, [router]);
  return /* @__PURE__ */ _jsxs(RootContainer, {
    children: [/* @__PURE__ */ _jsxs(HeaderContainer, {
      children: [/* @__PURE__ */ _jsx(Typography, {
        component: "h4",
        variant: "h4",
        children: "Content Feed"
      }), /* @__PURE__ */ _jsx(Button, {
        variant: "outlined",
        color: "inherit",
        onClick: onNewPost,
        disableRipple: true,
        sx: {
          maxWidth: "fit-content"
        },
        children: "New Post"
      })]
    }), /* @__PURE__ */ _jsx(PostList_default, {
      preloadedQuery
    })]
  });
};
var ContentFeed_default = ContentFeed;

export {
  ContentFeed_default
};
//# sourceMappingURL=chunk-IH7T7ZK3.mjs.map