"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireDefault(require("react"));

var _native = _interopRequireDefault(require("./native"));

var _useInput2 = _interopRequireDefault(require("../re-input/useInput"));

var _plainStyle = _interopRequireDefault(require("@remax/one/esm/useWebPlaceholderStyle/plainStyle"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
var _default = function _default(props) {
  var _useInput = (0, _useInput2.default)(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.default.createElement(_native.default, {
    style: (0, _plainStyle.default)(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: (0, _plainStyle.default)(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
  });
};

exports.default = _default;