import {
  ProfileItemFragment
} from "./chunk-YTT7MYZX.mjs";

// tmp-babel/content-feed/web/PostHeader/index.js
import { MoreVert as MoreVertIcon } from "@mui/icons-material";
import { Avatar, IconButton, Stack, Typography } from "@mui/material";
import { useFragment } from "react-relay";
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
var PostHeader = function PostHeader2(_ref) {
  var post = _ref.post;
  var profile = useFragment(ProfileItemFragment, post === null || post === void 0 ? void 0 : post.profile);
  if (!profile) return null;
  var image = profile.image, name = profile.name, urlPath = profile.urlPath;
  return /* @__PURE__ */ _jsxs(Stack, {
    p: 1.5,
    gap: 1,
    direction: "row",
    justifyContent: "space-between",
    children: [/* @__PURE__ */ _jsxs(Stack, {
      direction: "row",
      gap: 1,
      children: [/* @__PURE__ */ _jsx(Avatar, {
        sizes: "small",
        sx: {
          p: 0
        },
        src: image === null || image === void 0 ? void 0 : image.url
      }), /* @__PURE__ */ _jsxs(Stack, {
        children: [/* @__PURE__ */ _jsx(Typography, {
          variant: "subtitle2",
          children: name
        }), /* @__PURE__ */ _jsx(Typography, {
          variant: "caption",
          color: "text.secondary",
          children: (urlPath === null || urlPath === void 0 ? void 0 : urlPath.path) && /* @__PURE__ */ _jsxs(_Fragment, {
            children: ["@", urlPath.path.replace("/", "")]
          })
        })]
      })]
    }), /* @__PURE__ */ _jsx(IconButton, {
      "aria-label": "Post Options",
      sx: {
        transform: "translateX(16px)"
      },
      children: /* @__PURE__ */ _jsx(MoreVertIcon, {})
    })]
  });
};
var PostHeader_default = PostHeader;

export {
  PostHeader_default
};
//# sourceMappingURL=chunk-TCMIDOMZ.mjs.map