'use strict';

import _extends from "@babel/runtime/helpers/extends";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import React from 'react';
import { FormGroup } from './FormGroup';
import { DateRangePickerControl, DateRangePickerCtrl } from './DateRangePickerControl';
export var DateRangePicker =
/*#__PURE__*/
function (_FormGroup) {
  _inheritsLoose(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.createElement(DateRangePickerControl, _extends({}, this.props, {
      ref: "control"
    }, ariaDescProps, {
      hasFormGroupContainer: true
    }));
  };

  return DateRangePicker;
}(FormGroup);

_defineProperty(DateRangePicker, "propTypes", Object.assign({}, DateRangePickerCtrl.propTypes, FormGroup.propTypes));

_defineProperty(DateRangePicker, "defaultProps", Object.assign({}, DateRangePickerCtrl.defaultProps, FormGroup.defaultProps, {
  id: 'dateRangePicker',
  testAutomationId: 'dateRangePicker'
}));