import React from 'react'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore

import Input from './native';
import useInput from '../re-input/useInput';
import plainStyle from '@remax/one/esm/useWebPlaceholderStyle/plainStyle';
export default (function (props) {
  var _useInput = useInput(props),
      style = _useInput.style,
      placeholderStyle = _useInput.placeholderStyle,
      value = _useInput.value,
      className = _useInput.className,
      placeholder = _useInput.placeholder,
      focus = _useInput.focus,
      onBlur = _useInput.onBlur,
      onInput = _useInput.onInput,
      onFocus = _useInput.onFocus,
      autoHeight = _useInput.autoHeight,
      adjustPosition = _useInput.adjustPosition,
      disableDefaultPadding = _useInput.disableDefaultPadding,
      cursorSpacing = _useInput.cursorSpacing,
      defaultValue = _useInput.defaultValue,
      disabled = _useInput.disabled,
      maxLength = _useInput.maxLength,
      password = _useInput.password,
      confirmType = _useInput.confirmType,
      confirmHold = _useInput.confirmHold,
      showConfirmBar = _useInput.showConfirmBar,
      type = _useInput.type,
      placeholderClassName = _useInput.placeholderClassName,
      onConfirm = _useInput.onConfirm;

  return /*#__PURE__*/React.createElement(Input, {
    style: plainStyle(style),
    value: value,
    bindchange: function bindchange(e) {
      return onInput({
        detail: {
          value: e.detail
        }
      });
    },
    bindfocus: onFocus,
    bindblur: onBlur,
    bindconfirm: onConfirm,
    className: className,
    placeholder: placeholder,
    focus: focus,
    placeholderStyle: plainStyle(placeholderStyle),
    autoHeight: autoHeight,
    adjustPosition: adjustPosition,
    disableDefaultPadding: disableDefaultPadding,
    cursorSpacing: cursorSpacing,
    defaultValue: defaultValue,
    disabled: disabled,
    maxLength: maxLength,
    password: password,
    confirmType: confirmType,
    placeholderClassName: placeholderClassName,
    confirmHold: confirmHold,
    showConfirmBar: showConfirmBar,
    type: type
  });
});