import _extends from "@babel/runtime/helpers/extends";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["position", "className", "isInteractive"];
import React from "react";
import PropTypes from "prop-types";
import cx from "classnames";
import getClasses from "./styles";
var InputAdornment = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var _cx;

  var position = props.position,
      className = props.className,
      isInteractive = props.isInteractive,
      htmlProps = _objectWithoutProperties(props, _excluded);

  var classes = getClasses();
  var rootClassName = cx(classes.root, className, (_cx = {}, _defineProperty(_cx, classes.start, position === "start"), _defineProperty(_cx, classes.end, position === "end"), _defineProperty(_cx, classes.pointerEventNone, !isInteractive), _cx));
  return /*#__PURE__*/React.createElement("div", _extends({
    ref: ref,
    className: rootClassName
  }, htmlProps));
});
InputAdornment.propTypes = {
  className: PropTypes.string,
  position: PropTypes.string,
  isInteractive: PropTypes.bool
};
InputAdornment.defaultProps = {
  position: "start",
  isInteractive: true
};

if (process.env.NODE_ENV !== "production") {
  InputAdornment.displayName = "InputAdornment";
}

export default InputAdornment;