import { jsx } from "react/jsx-runtime";
import {
  getComputedFluidTypographyValue,
  privateApis as blockEditorPrivateApis
} from "@wordpress/block-editor";
import { __ } from "@wordpress/i18n";
import { unlock } from "../../../lock-unlock";
const { useGlobalStyle } = unlock(blockEditorPrivateApis);
function FontSizePreview({ fontSize }) {
  const [font] = useGlobalStyle("typography");
  const input = fontSize?.fluid?.min && fontSize?.fluid?.max ? {
    minimumFontSize: fontSize.fluid.min,
    maximumFontSize: fontSize.fluid.max
  } : {
    fontSize: fontSize.size
  };
  const computedFontSize = getComputedFluidTypographyValue(input);
  return /* @__PURE__ */ jsx(
    "div",
    {
      className: "edit-site-typography-preview",
      style: {
        fontSize: computedFontSize,
        fontFamily: font?.fontFamily ?? "serif"
      },
      children: __("Aa")
    }
  );
}
var font_size_preview_default = FontSizePreview;
export {
  font_size_preview_default as default
};
//# sourceMappingURL=font-size-preview.js.map
