"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = LineHeightControl;
var _i18n = require("@wordpress/i18n");
var _components = require("@wordpress/components");
var _utils = require("./utils");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * WordPress dependencies
 */

/**
 * Internal dependencies
 */

function LineHeightControl({
  value: lineHeight,
  onChange
}) {
  const isDefined = (0, _utils.isLineHeightDefined)(lineHeight);
  const value = isDefined ? lineHeight : _utils.BASE_DEFAULT_VALUE;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.UnitControl, {
    label: (0, _i18n.__)('Line Height')
    // Set minimun value of 1 since lower values break on Android
    ,
    min: 1,
    max: 5,
    step: _utils.STEP,
    value: value,
    onChange: onChange
    // TODO: should be updated to avoid using `false`, in order to
    // align with the web version of `UnitControl`
    ,
    units: false
  });
}
//# sourceMappingURL=index.native.js.map