// packages/editor/src/components/sidebar/post-summary.js
import { __experimentalVStack as VStack } from "@wordpress/components";
import { useSelect } from "@wordpress/data";
import PluginPostStatusInfo from "../plugin-post-status-info/index.js";
import PostAuthorPanel from "../post-author/panel.js";
import PostCardPanel from "../post-card-panel/index.js";
import PostContentInformation from "../post-content-information/index.js";
import PageAttributesPanel from "../page-attributes/panel.js";
import PostDiscussionPanel from "../post-discussion/panel.js";
import { PrivatePostExcerptPanel as PostExcerptPanel } from "../post-excerpt/panel.js";
import PostFeaturedImagePanel from "../post-featured-image/panel.js";
import PostFormatPanel from "../post-format/panel.js";
import PostLastEditedPanel from "../post-last-edited-panel/index.js";
import PostPanelSection from "../post-panel-section/index.js";
import PostSchedulePanel from "../post-schedule/panel.js";
import PostStatusPanel from "../post-status/index.js";
import PostSyncStatus from "../post-sync-status/index.js";
import PostTemplatePanel from "../post-template/panel.js";
import PostURLPanel from "../post-url/panel.js";
import BlogTitle from "../blog-title/index.js";
import PostsPerPage from "../posts-per-page/index.js";
import SiteDiscussion from "../site-discussion/index.js";
import { store as editorStore } from "../../store/index.js";
import { PrivatePostLastRevision } from "../post-last-revision/index.js";
import PostTrash from "../post-trash/index.js";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
var PANEL_NAME = "post-status";
function PostSummary({ onActionPerformed }) {
  const { isRemovedPostStatusPanel, postType, postId } = useSelect(
    (select) => {
      const {
        isEditorPanelRemoved,
        getCurrentPostType,
        getCurrentPostId
      } = select(editorStore);
      return {
        isRemovedPostStatusPanel: isEditorPanelRemoved(PANEL_NAME),
        postType: getCurrentPostType(),
        postId: getCurrentPostId()
      };
    },
    []
  );
  return /* @__PURE__ */ jsx(PostPanelSection, { className: "editor-post-summary", children: /* @__PURE__ */ jsx(PluginPostStatusInfo.Slot, { children: (fills) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(VStack, { spacing: 4, children: [
    /* @__PURE__ */ jsx(
      PostCardPanel,
      {
        postType,
        postId,
        onActionPerformed
      }
    ),
    /* @__PURE__ */ jsx(PostFeaturedImagePanel, { withPanelBody: false }),
    /* @__PURE__ */ jsx(PostExcerptPanel, {}),
    /* @__PURE__ */ jsxs(VStack, { spacing: 1, children: [
      /* @__PURE__ */ jsx(PostContentInformation, {}),
      /* @__PURE__ */ jsx(PostLastEditedPanel, {})
    ] }),
    !isRemovedPostStatusPanel && /* @__PURE__ */ jsxs(VStack, { spacing: 4, children: [
      /* @__PURE__ */ jsxs(VStack, { spacing: 1, children: [
        /* @__PURE__ */ jsx(PostStatusPanel, {}),
        /* @__PURE__ */ jsx(PostSchedulePanel, {}),
        /* @__PURE__ */ jsx(PostURLPanel, {}),
        /* @__PURE__ */ jsx(PostAuthorPanel, {}),
        /* @__PURE__ */ jsx(PostTemplatePanel, {}),
        /* @__PURE__ */ jsx(PostDiscussionPanel, {}),
        /* @__PURE__ */ jsx(PrivatePostLastRevision, {}),
        /* @__PURE__ */ jsx(PageAttributesPanel, {}),
        /* @__PURE__ */ jsx(PostSyncStatus, {}),
        /* @__PURE__ */ jsx(BlogTitle, {}),
        /* @__PURE__ */ jsx(PostsPerPage, {}),
        /* @__PURE__ */ jsx(SiteDiscussion, {}),
        /* @__PURE__ */ jsx(PostFormatPanel, {}),
        fills
      ] }),
      /* @__PURE__ */ jsx(
        PostTrash,
        {
          onActionPerformed
        }
      )
    ] })
  ] }) }) }) });
}
export {
  PostSummary as default
};
//# sourceMappingURL=post-summary.js.map
