'use strict';

var React = require('react');
var LocalizationContext = require('../../chunks/bundle-DPDyqKIJ.js');
var ui_MessageInput = require('../../ui/MessageInput.js');
var OpenChannel_context = require('../../chunks/bundle-xIRA27JP.js');
require('../../chunks/bundle-Conb-pOy.js');
require('../../chunks/bundle-BbrBawlX.js');
require('../../chunks/bundle-Cyl6_qLo.js');
require('../../chunks/bundle-Bomzwcdt.js');
require('../../chunks/bundle-BLz2EOZ5.js');
require('../../ui/IconButton.js');
require('../../ui/Button.js');
require('../../chunks/bundle-zgmRG2KL.js');
require('../../chunks/bundle-VKi81862.js');
require('dompurify');
require('../../chunks/bundle-DHuNGmIj.js');
require('../../chunks/bundle-2PCdBxVA.js');
require('../../chunks/bundle-BkgFGPs_.js');
require('../../ui/Icon.js');
require('../../chunks/bundle-CkQrhwR6.js');
require('../../chunks/bundle-fYxs1lss.js');
require('@sendbird/chat/groupChannel');
require('../../utils/message/getOutgoingMessageState.js');
require('../../chunks/bundle-DAdgL6r8.js');
require('../../chunks/bundle-Dobj18FB.js');
require('../../chunks/bundle-CVJwHwWn.js');
require('../../chunks/bundle-Cfh78Xnm.js');
require('../../chunks/bundle-CzkEKbFB.js');
require('../../chunks/bundle-Bq15P9qk.js');
require('../../chunks/bundle-B19RHFpR.js');
require('@sendbird/chat');
require('@sendbird/chat/openChannel');
require('../../chunks/bundle-Bnb8seJF.js');
require('../../chunks/bundle-CZ38Etcw.js');
require('../../chunks/bundle-dUH189qO.js');
require('../../chunks/bundle-t8BQsgL5.js');
require('../../chunks/bundle-CPW__Nwr.js');
require('../../chunks/bundle-C99t7tzf.js');
require('../../hooks/useModal.js');
require('../../chunks/bundle-DZlJeh0V.js');
require('react-dom');
require('../../chunks/bundle-Fv6PNPGZ.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
