import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-a6aa8be8.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-931c2c9e.js';
import '../../stringSet-ad8993d1.js';
import '../../index-757a563a.js';
import '../../_rollupPluginBabelHelpers-3e5825fa.js';
import 'react-dom/server';
import 'prop-types';
import '../../const-a965f964.js';
import '../../const-e27598a1.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-cd680863.js';
import '../../ui/Button.js';
import '../../index-67c5e94c.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-8ee9e1f5.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../index-6ccea9a6.js';
import '../../UserProfileContext-dd096494.js';
import '../../compareIds-c8335d61.js';
import '../../topics-9fbe0d61.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-9f7da91d.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
