'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
var Attach_styles = require('../../Attach.styles.js');
var HiddenWidthHelper_styles = require('./HiddenWidthHelper.styles.js');
var AttachButton = require('../AttachButton/AttachButton.js');
var MoreTrigger = require('../../ui/MoreTrigger/MoreTrigger.js');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefault(React);

var _StyledAttachButtonWr;
var HiddenWidthHelper = /*#__PURE__*/React.forwardRef(function (_ref, wrapperRef) {
  var hideButtonOnAttach = _ref.hideButtonOnAttach,
    filesLength = _ref.filesLength,
    hasHiddenFiles = _ref.hasHiddenFiles,
    size = _ref.size;
  return /*#__PURE__*/React__default.default.createElement(HiddenWidthHelper_styles.HiddenRoot, null, (!hideButtonOnAttach || !filesLength) && (_StyledAttachButtonWr || (_StyledAttachButtonWr = /*#__PURE__*/React__default.default.createElement(Attach_styles.StyledAttachButtonWrapper, null, /*#__PURE__*/React__default.default.createElement(AttachButton.AttachButton, null)))), /*#__PURE__*/React__default.default.createElement(HiddenWidthHelper_styles.HiddenWrapper, {
    ref: wrapperRef
  }), hasHiddenFiles && /*#__PURE__*/React__default.default.createElement(MoreTrigger.MoreTrigger, {
    size: size
  }));
});

exports.HiddenWidthHelper = HiddenWidthHelper;
