import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-5920dafc.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-1438b899.js';
import '../../stringSet-f0e25f08.js';
import '../../index-b5b56cb7.js';
import '../../_rollupPluginBabelHelpers-636e674b.js';
import 'react-dom/server';
import 'prop-types';
import '../../const-2aae43f2.js';
import '../../const-8bb8cc10.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-279bc71d.js';
import '../../ui/Button.js';
import '../../index-4a23e6ff.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-1a59aaa9.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../index-4f51d577.js';
import '../../UserProfileContext-749db4f6.js';
import '../../compareIds-5494c074.js';
import '../../topics-d2e15fe6.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-636df95b.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';

var MessageInputWrapper = function (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;
  var value = props.value;
  return /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-openchannel-footer"
  }, /*#__PURE__*/React__default.createElement(MessageInput, {
    ref: ref,
    value: value,
    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
