import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-2a073ef0.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-2e3fa2dd.js';
import '../../stringSet-647493ce.js';
import '../../index-5ec69689.js';
import '../../_rollupPluginBabelHelpers-3043541a.js';
import 'prop-types';
import '../../const-51fc1a68.js';
import '../../const-b88f8299.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-710c6267.js';
import '../../index-6a47d16f.js';
import '../../index-ed39099a.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-03ccaf35.js';
import '../../index-7f2be3d7.js';
import '../../UserProfileContext-143a6a42.js';
import '../../compareIds-2e073780.js';
import '../../topics-18836011.js';
import '../../sendbird-597583ed.js';
import '../../__bundle-6316ce22-cd546820.js';
import '../../__bundle-fbda47dd-9dbeee1d.js';
import '../../openChannel-1548376e.js';
import '../../__bundle-7dfccc8c-6c6e7ab4.js';
import '../../uuid-60ae25c1.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
