'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 { DatePickerControl } from './DatePickerControl';
export var DatePicker =
/*#__PURE__*/
function (_FormGroup) {
  _inheritsLoose(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.createElement(DatePickerControl, _extends({}, this.getSafeProps(this.props), {
      ref: "control",
      hasFormGroupContainer: true
    }, ariaDescProps));
  };

  return DatePicker;
}(FormGroup);

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

_defineProperty(DatePicker, "defaultProps", Object.assign({}, FormGroup.defaultProps, {
  testAutomationId: 'datePicker'
}));