'use strict';

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.DatePicker = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));

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

var _FormGroup2 = require("./FormGroup");

var _DatePickerControl = require("./DatePickerControl");

var DatePicker =
/*#__PURE__*/
function (_FormGroup) {
  (0, _inheritsLoose2.default)(DatePicker, _FormGroup);

  function DatePicker() {
    return _FormGroup.apply(this, arguments) || this;
  }

  var _proto = DatePicker.prototype;

  _proto.renderInput = function renderInput(hasError) {
    var ariaDescProps = this.getAriaDescProps(hasError);
    return _react.default.createElement(_DatePickerControl.DatePickerControl, (0, _extends2.default)({}, this.getSafeProps(this.props), {
      ref: "control",
      hasFormGroupContainer: true
    }, ariaDescProps));
  };

  return DatePicker;
}(_FormGroup2.FormGroup);

exports.DatePicker = DatePicker;
(0, _defineProperty2.default)(DatePicker, "propTypes", Object.assign({}, _FormGroup2.FormGroup.propTypes));
(0, _defineProperty2.default)(DatePicker, "defaultProps", Object.assign({}, _FormGroup2.FormGroup.defaultProps, {
  testAutomationId: 'datePicker'
}));