// packages/editor/src/components/sidebar/header.js
import { privateApis as componentsPrivateApis } from "@wordpress/components";
import { __, _x } from "@wordpress/i18n";
import { useSelect } from "@wordpress/data";
import { forwardRef } from "@wordpress/element";
import { decodeEntities } from "@wordpress/html-entities";
import { store as editorStore } from "../../store/index.mjs";
import { unlock } from "../../lock-unlock.mjs";
import { sidebars } from "./constants.mjs";
import { jsx, jsxs } from "react/jsx-runtime";
var { Tabs } = unlock(componentsPrivateApis);
var SidebarHeader = (_, ref) => {
  const postTypeLabel = useSelect(
    (select) => select(editorStore).getPostTypeLabel(),
    []
  );
  const documentLabel = postTypeLabel ? decodeEntities(postTypeLabel) : (
    // translators: Default label for the Document sidebar tab, not selected.
    _x("Document", "noun, panel")
  );
  return /* @__PURE__ */ jsxs(Tabs.TabList, { ref, children: [
    /* @__PURE__ */ jsx(
      Tabs.Tab,
      {
        tabId: sidebars.document,
        "data-tab-id": sidebars.document,
        children: documentLabel
      }
    ),
    /* @__PURE__ */ jsx(
      Tabs.Tab,
      {
        tabId: sidebars.block,
        "data-tab-id": sidebars.block,
        children: __("Block")
      }
    )
  ] });
};
var header_default = forwardRef(SidebarHeader);
export {
  header_default as default
};
//# sourceMappingURL=header.mjs.map
