import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-1417e9d3.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-5d02b219.js';
import '../../stringSet-adf0eb59.js';
import '../../index-097f4b78.js';
import '../../_rollupPluginBabelHelpers-87a4819d.js';
import 'prop-types';
import '../../const-7b1f25aa.js';
import '../../const-c2efe3b4.js';
import '../../ui/IconButton.js';
import '../../index-ff084076.js';
import '../../index-fdcc4a92.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-e647d770.js';
import '../../tslib.es6-5a2250f9.js';
import '../../index-89c172fc.js';
import '../../UserProfileContext-c72e5006.js';
import '../../compareIds-9b3202b9.js';
import '../../topics-29b13da4.js';
import '../../openChannel-4de8ae5b.js';
import '../../__bundle-7dfccc8c-be772b9c.js';
import '../../uuid-9ac267fb.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';

var MessageInputWrapper = function MessageInputWrapper(props, ref) {
  var _a = useOpenChannelContext(),
      currentOpenChannel = _a.currentOpenChannel,
      disabled = _a.disabled,
      handleSendMessage = _a.handleSendMessage,
      handleFileUpload = _a.handleFileUpload;

  var channel = currentOpenChannel;

  if (!channel) {
    return;
  }

  var stringSet = useContext(LocalizationContext).stringSet;
  return /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-openchannel-footer"
  }, /*#__PURE__*/React__default.createElement(MessageInput, {
    ref: ref,
    disabled: disabled,
    onSendMessage: handleSendMessage,
    onFileUpload: handleFileUpload,
    placeholder: disabled && stringSet.MESSAGE_INPUT__PLACE_HOLDER__DISABLED // add disabled because of muted state

  }));
};

var OpenChannelInput = /*#__PURE__*/React__default.forwardRef(MessageInputWrapper);

export { OpenChannelInput as default };
//# sourceMappingURL=OpenChannelInput.js.map
