'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 { FileUploadControl } from './FileUploadControl';
export var FileUpload =
/*#__PURE__*/
function (_FormGroup) {
  _inheritsLoose(FileUpload, _FormGroup);

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

  var _proto = FileUpload.prototype;

  _proto.renderInput = function renderInput(hasError) {
    var bsStyle = this.props.bsStyle;
    var ariaDescProps = this.getAriaDescProps(hasError);
    return React.createElement(FileUploadControl, _extends({}, this.getSafeProps(this.props), {
      ref: "control",
      hasFormGroupContainer: true,
      bsStyle: bsStyle
    }, ariaDescProps));
  };

  return FileUpload;
}(FormGroup);

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

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