"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.InputClearButton = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactstrap = require("reactstrap");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
var InputClearButton = _ref => {
  var {
    inputValue,
    disabled,
    clearButtonElement,
    onClick: _onClick
  } = _ref;
  return /*#__PURE__*/_react.default.createElement("div", {
    className: "rdp-addon input-group-append"
  }, /*#__PURE__*/_react.default.createElement(_reactstrap.InputGroupText, {
    onClick: () => disabled ? null : _onClick(),
    style: {
      opacity: inputValue && !disabled ? 1 : 0.5,
      cursor: inputValue && !disabled ? 'pointer' : 'not-allowed',
      height: "100%"
    }
  }, clearButtonElement));
};
exports.InputClearButton = InputClearButton;