'use strict';

var React = require('react');
var LocalizationContext = require('../../chunks/bundle-DDNdw3A9.js');
var ui_MessageInput = require('../../ui/MessageInput.js');
var OpenChannel_context = require('../../chunks/bundle-BeI9AozB.js');
require('../../chunks/bundle-CxoFSSXv.js');
require('../../chunks/bundle-EhtiN7UV.js');
require('../../chunks/bundle-BV7y6VDn.js');
require('../../chunks/bundle-Cwboa2Wr.js');
require('../../chunks/bundle-kPv1Olqr.js');
require('../../ui/IconButton.js');
require('../../ui/Button.js');
require('../../chunks/bundle-B0UICprZ.js');
require('../../chunks/bundle-Bx1_cAVo.js');
require('dompurify');
require('../../chunks/bundle-za5uPkdP.js');
require('../../chunks/bundle-CgCnWqE5.js');
require('../../chunks/bundle-BXvzT2m9.js');
require('../../ui/Icon.js');
require('../../chunks/bundle-DQNu-S6D.js');
require('../../chunks/bundle-D7YiKR6i.js');
require('@sendbird/chat/groupChannel');
require('../../utils/message/getOutgoingMessageState.js');
require('../../chunks/bundle-dfqZUdij.js');
require('../../chunks/bundle-Dn0hi6OJ.js');
require('../../chunks/bundle-C1G0SKDq.js');
require('../../chunks/bundle-yU9Mr2pS.js');
require('../../chunks/bundle-CXHWkhsI.js');
require('../../chunks/bundle-LI9JjqG2.js');
require('../../chunks/bundle-AAO7jUU2.js');
require('@sendbird/chat');
require('@sendbird/chat/openChannel');
require('../../chunks/bundle-DeyX1dvY.js');
require('../../chunks/bundle-CvQwksvR.js');
require('../../chunks/bundle-BPWJgESF.js');
require('../../chunks/bundle-BUGwK1WK.js');
require('../../chunks/bundle-B2xIXbEG.js');
require('../../chunks/bundle-C8MACRPO.js');
require('../../hooks/useModal.js');
require('../../chunks/bundle-YeW89zsR.js');
require('react-dom');
require('../../chunks/bundle-CyQD5TkW.js');

function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefaultCompat(React);

var OpenChannelInput = React__default.default.forwardRef(function (props, ref) {
    var _a = OpenChannel_context.useOpenChannelContext(), currentOpenChannel = _a.currentOpenChannel, disabled = _a.disabled, handleSendMessage = _a.handleSendMessage, handleFileUpload = _a.handleFileUpload, amIMuted = _a.amIMuted;
    var channel = currentOpenChannel;
    var stringSet = React.useContext(LocalizationContext.LocalizationContext).stringSet;
    var value = props.value;
    function getPlaceHolderString() {
        if (amIMuted) {
            return stringSet.MESSAGE_INPUT__PLACE_HOLDER__MUTED;
        }
        if (disabled) {
            return stringSet.MESSAGE_INPUT__PLACE_HOLDER__DISABLED;
        }
        return '';
    }
    if (!channel) {
        return null;
    }
    return (React__default.default.createElement("div", { className: "sendbird-openchannel-footer" },
        React__default.default.createElement(ui_MessageInput, { channel: currentOpenChannel, ref: ref, value: value, disabled: disabled, isVoiceMessageEnabled: false, onSendMessage: handleSendMessage, onFileUpload: handleFileUpload, placeholder: getPlaceHolderString() })));
});

module.exports = OpenChannelInput;
//# sourceMappingURL=OpenChannelInput.js.map
