// packages/block-editor/src/components/inspector-popover-header/index.js
import {
  __experimentalVStack as VStack,
  __experimentalHStack as HStack,
  __experimentalHeading as Heading,
  __experimentalSpacer as Spacer,
  Button,
  __experimentalText as Text
} from "@wordpress/components";
import { closeSmall } from "@wordpress/icons";
import { __ } from "@wordpress/i18n";
import { jsx, jsxs } from "react/jsx-runtime";
function InspectorPopoverHeader({
  title,
  help,
  actions = [],
  onClose
}) {
  return /* @__PURE__ */ jsxs(VStack, { className: "block-editor-inspector-popover-header", spacing: 4, children: [
    /* @__PURE__ */ jsxs(HStack, { alignment: "center", children: [
      /* @__PURE__ */ jsx(
        Heading,
        {
          className: "block-editor-inspector-popover-header__heading",
          level: 2,
          size: 13,
          children: title
        }
      ),
      /* @__PURE__ */ jsx(Spacer, {}),
      actions.map(({ label, icon, onClick }) => /* @__PURE__ */ jsx(
        Button,
        {
          size: "small",
          className: "block-editor-inspector-popover-header__action",
          label,
          icon,
          variant: !icon && "tertiary",
          onClick,
          children: !icon && label
        },
        label
      )),
      onClose && /* @__PURE__ */ jsx(
        Button,
        {
          size: "small",
          className: "block-editor-inspector-popover-header__action",
          label: __("Close"),
          icon: closeSmall,
          onClick: onClose
        }
      )
    ] }),
    help && /* @__PURE__ */ jsx(Text, { children: help })
  ] });
}
export {
  InspectorPopoverHeader as default
};
//# sourceMappingURL=index.js.map
