// packages/block-editor/src/components/block-switcher/preview-block-popover.js
import { __ } from "@wordpress/i18n";
import { Popover } from "@wordpress/components";
import { useViewportMatch } from "@wordpress/compose";
import BlockPreview from "../block-preview";
import { jsx, jsxs } from "react/jsx-runtime";
function PreviewBlockPopover({ blocks }) {
  const isMobile = useViewportMatch("medium", "<");
  if (isMobile) {
    return null;
  }
  return /* @__PURE__ */ jsx("div", { className: "block-editor-block-switcher__popover-preview-container", children: /* @__PURE__ */ jsx(
    Popover,
    {
      className: "block-editor-block-switcher__popover-preview",
      placement: "right-start",
      focusOnMount: false,
      offset: 16,
      children: /* @__PURE__ */ jsxs("div", { className: "block-editor-block-switcher__preview", children: [
        /* @__PURE__ */ jsx("div", { className: "block-editor-block-switcher__preview-title", children: __("Preview") }),
        /* @__PURE__ */ jsx(BlockPreview, { viewportWidth: 601, blocks })
      ] })
    }
  ) });
}
export {
  PreviewBlockPopover as default
};
//# sourceMappingURL=preview-block-popover.js.map
