import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-187f787e.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-ea703f1a.js';
import '../../stringSet-fd70cba0.js';
import '../../index-5b34a381.js';
import '../../_rollupPluginBabelHelpers-dfc61977.js';
import 'prop-types';
import '../../const-693a408f.js';
import '../../const-26fafb08.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-645dedf8.js';
import '../../ui/Button.js';
import '../../index-46d8dde5.js';
import 'dompurify';
import '../../consts-b2395440.js';
import '../../ui/Icon.js';
import '../../index-102fbe62.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../index-c55389dc.js';
import '../../UserProfileContext-d2264917.js';
import '../../compareIds-86584ff3.js';
import '../../topics-c4837013.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-e15650df.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
