import React__default, { useContext } from 'react';
import { a as LocalizationContext } from '../../LocalizationContext-fd0d32ab.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../OpenChannelProvider-e39971da.js';
import '../../stringSet-eb4a64cb.js';
import '../../index-ce08211b.js';
import '../../_rollupPluginBabelHelpers-f6b9b32e.js';
import 'react-dom/server';
import 'prop-types';
import '../../const-b4823468.js';
import '../../const-e71ab906.js';
import '../../ui/IconButton.js';
import '../../tslib.es6-46e4c379.js';
import '../../ui/Button.js';
import '../../index-dfa71ceb.js';
import '../../ui/MentionUserLabel.js';
import '../../ui/Icon.js';
import '../../index-f6fd2b53.js';
import '../../index-94381d3a.js';
import '../../UserProfileContext-d36099b1.js';
import '../../compareIds-4bd391cb.js';
import '../../topics-307251cc.js';
import '../../sendbird-7e3109ab.js';
import '../../__bundle-57e0c5af-4e9165b5.js';
import '../../__bundle-0dad34cd-10d4f218.js';
import '../../openChannel-80b84235.js';
import '../../__bundle-bd072f34-1aaac363.js';
import '../../uuid-e8248f01.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
