import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-a21fd99c.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-41409e71.js';
import '../../stringSet-97b371bf.js';
import '../../index-2f7dc394.js';
import '../../_rollupPluginBabelHelpers-3be2ec67.js';
import 'react-dom/server';
import 'prop-types';
import '../../const-b50ee378.js';
import '../../const-05b7e2ee.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-7933cbb3.js';
import '../../ui/Button.js';
import '../../index-4572759d.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-c35128dd.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../index-58580f28.js';
import '../../UserProfileContext-804d6e7c.js';
import '../../compareIds-0e39568a.js';
import '../../topics-0034d31d.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-0426c252.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
