"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _i18n = require("@wordpress/i18n");
var _toggleGroupControl = require("../toggle-group-control");
var _constants = require("./constants");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

const FontSizePickerToggleGroup = props => {
  const {
    fontSizes,
    value,
    __next40pxDefaultSize,
    size,
    onChange
  } = props;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_toggleGroupControl.ToggleGroupControl, {
    __nextHasNoMarginBottom: true,
    __next40pxDefaultSize: __next40pxDefaultSize,
    __shouldNotWarnDeprecated36pxSize: true,
    label: (0, _i18n.__)('Font size'),
    hideLabelFromVision: true,
    value: value,
    onChange: onChange,
    isBlock: true,
    size: size,
    children: fontSizes.map((fontSize, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_toggleGroupControl.ToggleGroupControlOption, {
      value: fontSize.size,
      label: _constants.T_SHIRT_ABBREVIATIONS[index],
      "aria-label": fontSize.name || _constants.T_SHIRT_NAMES[index],
      showTooltip: true
    }, fontSize.slug))
  });
};
var _default = exports.default = FontSizePickerToggleGroup;
//# sourceMappingURL=font-size-picker-toggle-group.js.map