"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.withFileUploaderControlProvider = void 0;var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _react = _interopRequireDefault(require("react"));


var _FileUploaderControlProvider = require("./FileUploaderControlProvider");var _excluded = ["onRemove", "onValueChange", "onAttach", "initialFiles"];

var withFileUploaderControlProvider = exports.withFileUploaderControlProvider = function withFileUploaderControlProvider(
Component)


{
  return /*#__PURE__*/_react.default.memo( /*#__PURE__*/
    _react.default.forwardRef(
      function (props, ref) {
        var onRemove = props.onRemove,onValueChange = props.onValueChange,onAttach = props.onAttach,initialFiles = props.initialFiles,rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
        return /*#__PURE__*/(
          _react.default.createElement(_FileUploaderControlProvider.FileUploaderControlProvider, props, /*#__PURE__*/
          _react.default.createElement(Component, (0, _extends2.default)({ ref: ref }, rest))
          ));

      }
    )
  );
};