import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-a6f8fb25.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-10dd5869.js';
import '../../stringSet-ed906148.js';
import '../../index-fb7fd76d.js';
import '../../_rollupPluginBabelHelpers-b9099c54.js';
import 'react-dom/server';
import 'prop-types';
import '../../const-16fc416a.js';
import '../../const-07519343.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-84f8edfa.js';
import '../../ui/Button.js';
import '../../index-c2f20322.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-cc905e95.js';
import '../../index-2db9735a.js';
import '../../UserProfileContext-58463608.js';
import '../../compareIds-4839d86c.js';
import '../../topics-398017ae.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../uuid-bd74c65a.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
