import _Input from "@alifd/next/es/input";
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["title", "style", "value", "InputLength", "placeholder", "defaultValue", "controlType", "isAllowNull", "isAllowUpdate", "isAllowTransmit"];
import * as React from 'react';
import "./index.scss";
var CommonInput = function CommonInput(_ref) {
  var title = _ref.title,
    _ref$style = _ref.style,
    style = _ref$style === void 0 ? {} : _ref$style,
    value = _ref.value,
    InputLength = _ref.InputLength,
    placeholder = _ref.placeholder,
    defaultValue = _ref.defaultValue,
    controlType = _ref.controlType,
    isAllowNull = _ref.isAllowNull,
    isAllowUpdate = _ref.isAllowUpdate,
    isAllowTransmit = _ref.isAllowTransmit,
    otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
  React.useEffect(function () {
    console.log(value);
  }, [value]);
  var _style = style || {};
  var _otherProps = otherProps || {};
  _otherProps.style = _style;
  return /*#__PURE__*/React.createElement(_Input, _extends({
    style: style,
    label: title,
    defaultValue: defaultValue,
    readOnly: isAllowUpdate,
    maxLength: InputLength,
    placeholder: placeholder
  }, _otherProps));
};
export default CommonInput;