'use strict';

var React = require('react');
var LocalizationContext = require('../../chunks/bundle-6SzyBwQ5.js');
var ui_MessageInput = require('../../ui/MessageInput.js');
var OpenChannel_context = require('../../chunks/bundle-pp7tp7GG.js');
require('../../chunks/bundle-H9rcn1PJ.js');
require('../../chunks/bundle-AN4eZ2xs.js');
require('../../chunks/bundle-DhtZdKsr.js');
require('../../chunks/bundle--tki3Ejh.js');
require('../../chunks/bundle-MNUU2JEo.js');
require('../../ui/IconButton.js');
require('../../ui/Button.js');
require('../../chunks/bundle-VxcYXhwp.js');
require('../../chunks/bundle-t2GWOYzL.js');
require('dompurify');
require('../../chunks/bundle-nYBtJl9e.js');
require('../../chunks/bundle-RUqSDidW.js');
require('../../chunks/bundle-0zagc7hR.js');
require('../../ui/Icon.js');
require('../../chunks/bundle-Y-_KhZFq.js');
require('../../useSendbirdStateContext.js');
require('../../withSendbird.js');
require('../../chunks/bundle-nox41MG6.js');
require('@sendbird/chat/groupChannel');
require('../../utils/message/getOutgoingMessageState.js');
require('../../chunks/bundle-xM2DAzE6.js');
require('../../chunks/bundle-haAptps1.js');
require('../../chunks/bundle-TPy0gj60.js');
require('../../chunks/bundle-NZvAE9FS.js');
require('../../chunks/bundle-77qvrXp8.js');
require('@sendbird/chat');
require('@sendbird/chat/openChannel');
require('../../chunks/bundle-TB_UEIPg.js');
require('../../chunks/bundle-PSEoX-EH.js');
require('../../chunks/bundle-HQAiUNev.js');
require('../../hooks/useModal.js');
require('../../chunks/bundle-6L4HCLmb.js');
require('react-dom');
require('../../chunks/bundle-6zBNmPOP.js');
require('../../chunks/bundle-UAspU0bH.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
