"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _blockEditor = require("@wordpress/block-editor");
var _i18n = require("@wordpress/i18n");
var _lockUnlock = require("../../../lock-unlock");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

const {
  useGlobalStyle
} = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
function FontSizePreview({
  fontSize
}) {
  var _font$fontFamily;
  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 = (0, _blockEditor.getComputedFluidTypographyValue)(input);
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
    className: "edit-site-typography-preview",
    style: {
      fontSize: computedFontSize,
      fontFamily: (_font$fontFamily = font?.fontFamily) !== null && _font$fontFamily !== void 0 ? _font$fontFamily : 'serif'
    },
    children: (0, _i18n.__)('Aa')
  });
}
var _default = exports.default = FontSizePreview;
//# sourceMappingURL=font-size-preview.js.map