"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _numberPicker = _interopRequireDefault(require("@alifd/next/lib/number-picker"));
var _range = _interopRequireDefault(require("@alifd/next/lib/range"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
var React = _interopRequireWildcard(require("react"));
require("./index.scss");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var SizeSetter = /*#__PURE__*/function (_PureComponent) {
  (0, _inheritsLoose2["default"])(SizeSetter, _PureComponent);
  function SizeSetter() {
    return _PureComponent.apply(this, arguments) || this;
  }
  var _proto = SizeSetter.prototype;
  _proto.render = function render() {
    var _this$props = this.props,
      value = _this$props.value,
      _this$props$options = _this$props.options,
      min = _this$props$options.min,
      max = _this$props$options.max,
      step = _this$props$options.step,
      suffix = _this$props$options.suffix,
      _onChange = _this$props.onChange;
    return /*#__PURE__*/React.createElement("div", {
      className: "size-setter"
    }, /*#__PURE__*/React.createElement(_range["default"], {
      value: value,
      min: min,
      max: max,
      step: step,
      onChange: function onChange(val) {
        return _onChange(val);
      },
      style: {
        marginRight: 15
      }
    }), /*#__PURE__*/React.createElement(_numberPicker["default"], {
      onChange: function onChange(val) {
        return _onChange(val);
      },
      value: value,
      size: "small",
      min: min,
      max: max,
      step: step,
      hasTrigger: false,
      innerAfter: suffix
    }));
  };
  return SizeSetter;
}(React.PureComponent);
exports["default"] = SizeSetter;
SizeSetter.displayName = 'SizeSetter';