"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _input = _interopRequireDefault(require("@alifd/next/lib/input"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var React = _interopRequireWildcard(require("react"));
require("./index.scss");
var _excluded = ["color", "style"];
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var ColorfulInput = function ColorfulInput(_ref) {
  var color = _ref.color,
    _ref$style = _ref.style,
    style = _ref$style === void 0 ? {} : _ref$style,
    otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
  var _style = style || {};
  if (color) {
    _style.backgroundColor = color;
  }
  var _otherProps = otherProps || {};
  _otherProps.style = _style;
  return /*#__PURE__*/React.createElement(_input["default"], _otherProps);
};
var _default = exports["default"] = ColorfulInput;