import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-d1588f62.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-c5bcb0a7.js';
import '../../stringSet-e01b2800.js';
import '../../index-29b5f961.js';
import '../../_rollupPluginBabelHelpers-84c5f752.js';
import 'react-dom/server';
import 'prop-types';
import '../../const-db680d9b.js';
import '../../const-eebfa48b.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-7fcea8bc.js';
import '../../ui/Button.js';
import '../../index-eebb33bc.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-7fb69390.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../index-2bcbd629.js';
import '../../UserProfileContext-4000b574.js';
import '../../compareIds-1c8d9514.js';
import '../../topics-3e4dcc24.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-35d63c11.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
