import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-bed38f81.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-5b45f840.js';
import '../../stringSet-07d51930.js';
import '../../index-6e02fc15.js';
import '../../_rollupPluginBabelHelpers-51451000.js';
import 'prop-types';
import '../../const-5ab9bb9f.js';
import '../../const-db8ec16d.js';
import '../../ui/IconButton.js';
import '../../index-a3d218da.js';
import '../../index-33456100.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-c67f2f3b.js';
import '../../tslib.es6-7a52c497.js';
import '../../index-1984c852.js';
import '../../UserProfileContext-5bc5ff98.js';
import '../../compareIds-7eaf62a5.js';
import '../../topics-a5f3f0e9.js';
import '../../openChannel-92ffb0b5.js';
import '../../__bundle-7dfccc8c-dc566919.js';
import '../../uuid-b7da2ddf.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';

var MessageInputWrapper = function MessageInputWrapper(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;
  return /*#__PURE__*/React__default.createElement("div", {
    className: "sendbird-openchannel-footer"
  }, /*#__PURE__*/React__default.createElement(MessageInput, {
    ref: ref,
    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
