import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-a600fb50.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-44644559.js';
import '../../stringSet-91224dde.js';
import '../../index-8a738c8a.js';
import '../../_rollupPluginBabelHelpers-409f988a.js';
import 'react-dom/server';
import 'prop-types';
import '../../const-654f9496.js';
import '../../const-55d2d983.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-88db6fd7.js';
import '../../ui/Button.js';
import '../../index-191a1508.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-07f9c3d9.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../index-bbd69eed.js';
import '../../UserProfileContext-14ece55d.js';
import '../../compareIds-62c0f89f.js';
import '../../topics-43edce25.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-a6fa7f5c.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
