'use strict';

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

exports.__esModule = true;
exports.DateRangePicker = 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 _DateRangePickerControl = require("./DateRangePickerControl");

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

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

  var _proto = DateRangePicker.prototype;

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

  return DateRangePicker;
}(_FormGroup2.FormGroup);

exports.DateRangePicker = DateRangePicker;
(0, _defineProperty2.default)(DateRangePicker, "propTypes", Object.assign({}, _DateRangePickerControl.DateRangePickerCtrl.propTypes, _FormGroup2.FormGroup.propTypes));
(0, _defineProperty2.default)(DateRangePicker, "defaultProps", Object.assign({}, _DateRangePickerControl.DateRangePickerCtrl.defaultProps, _FormGroup2.FormGroup.defaultProps, {
  id: 'dateRangePicker',
  testAutomationId: 'dateRangePicker'
}));