import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-8725e9b2.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-a731aa78.js';
import '../../stringSet-a513039b.js';
import '../../index-c10fcd31.js';
import '../../_rollupPluginBabelHelpers-945410b2.js';
import 'react-dom/server';
import 'prop-types';
import '../../const-0f759572.js';
import '../../const-85535a89.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-e1c2b6be.js';
import '../../ui/Button.js';
import '../../index-e121c395.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-43834bc0.js';
import '../../utils/message/getOutgoingMessageState.js';
import 'dompurify';
import '../../index-99933718.js';
import '../../UserProfileContext-cc71f901.js';
import '../../compareIds-87972c5f.js';
import '../../topics-a581acbb.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-d072af26.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,
    isVoiceMessageEnabled: false,
    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
