import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-9c54e783.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-fe3326aa.js';
import '../../stringSet-1f18348a.js';
import '../../index-a9ddd0f5.js';
import '../../_rollupPluginBabelHelpers-b2d9bfc5.js';
import 'prop-types';
import '../../const-6a07b718.js';
import '../../const-5f722b91.js';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../index-4111594a.js';
import 'dompurify';
import '../../consts-d4c78cc0.js';
import '../../ui/Icon.js';
import '../../index-dbe0e004.js';
import '../../utils/message/getOutgoingMessageState.js';
import '../../consts-aadaccca.js';
import '../../consts-790ae3a9.js';
import '../../tokenize-63d895d3.js';
import '../../index-f48cfdf7.js';
import '../../UserProfileContext-a8aa4c0f.js';
import '../../compareIds-1e0e668f.js';
import '../../topics-d8d10f83.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-48baadaf.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';

const MessageInputWrapper = (props, ref) => {
  const {
    currentOpenChannel,
    disabled,
    handleSendMessage,
    handleFileUpload
  } = useOpenChannelContext();
  const channel = currentOpenChannel;
  if (!channel) {
    return;
  }
  const {
    stringSet
  } = useContext(LocalizationContext);
  const {
    value
  } = props;
  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
