import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-0a81b301.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-0ce9c650.js';
import '../../stringSet-522716ae.js';
import '../../index-a682dd0a.js';
import '../../_rollupPluginBabelHelpers-1596259a.js';
import 'react-dom/server';
import 'prop-types';
import '../../const-d3c760a4.js';
import '../../const-faf029e4.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-1d845c73.js';
import '../../ui/Button.js';
import '../../index-4052efb0.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-75c6845d.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../index-837130fb.js';
import '../../UserProfileContext-8cec4652.js';
import '../../compareIds-8f9595bc.js';
import '../../topics-4353311c.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-1f647558.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
