'use strict';

var React = require('react');
var LocalizationContext = require('../../chunks/bundle-BLV9zZk1.js');
var ui_MessageInput = require('../../ui/MessageInput.js');
var OpenChannel_context = require('../../chunks/bundle-9dW3x924.js');
require('../../chunks/bundle-Ck_8lQa-.js');
require('../../chunks/bundle-V-_XUHW5.js');
require('../../chunks/bundle-5ru_FO5x.js');
require('../../chunks/bundle-DrV1GooU.js');
require('../../chunks/bundle-DrCmmE89.js');
require('../../ui/IconButton.js');
require('../../ui/Button.js');
require('../../chunks/bundle-DCPc6-Im.js');
require('../../chunks/bundle-D0hE0g6d.js');
require('dompurify');
require('../../chunks/bundle-B20ESzEn.js');
require('../../chunks/bundle-9ogjIkrJ.js');
require('../../chunks/bundle-B3qxP7Hx.js');
require('../../ui/Icon.js');
require('../../chunks/bundle-Cd8aIDXf.js');
require('../../useSendbirdStateContext.js');
require('../../withSendbird.js');
require('../../chunks/bundle-Ce6jCnmC.js');
require('@sendbird/chat/groupChannel');
require('../../utils/message/getOutgoingMessageState.js');
require('../../chunks/bundle-BFtlkbFV.js');
require('../../chunks/bundle-lBIlhpy4.js');
require('../../chunks/bundle-Cgk-lpZZ.js');
require('../../chunks/bundle-C0PM57R_.js');
require('../../chunks/bundle-BedaAirg.js');
require('@sendbird/chat');
require('@sendbird/chat/openChannel');
require('../../chunks/bundle-slS7A2f9.js');
require('../../chunks/bundle-CFOCblXb.js');
require('../../chunks/bundle-Bvh9LUfE.js');
require('../../hooks/useModal.js');
require('../../chunks/bundle-CHERnV8x.js');
require('react-dom');
require('../../chunks/bundle-DqTUSoNi.js');
require('../../chunks/bundle-MDcnM2N1.js');

var OpenChannelInput = React.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.createElement("div", { className: "sendbird-openchannel-footer" },
        React.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
