import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-299b1d45.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-a0d666c6.js';
import '../../stringSet-8039f73a.js';
import '../../index-14786153.js';
import '../../_rollupPluginBabelHelpers-d746227b.js';
import 'react-dom/server';
import 'prop-types';
import '../../const-c982283f.js';
import '../../const-40f65aaf.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-ea477498.js';
import '../../ui/Button.js';
import '../../index-256d00f1.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-b16ab63e.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../index-a8115de7.js';
import '../../UserProfileContext-53d89b5e.js';
import '../../compareIds-4e3d3f6c.js';
import '../../topics-948f8346.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-2d756af4.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
