'use strict';

var React = require('react');
var LocalizationContext = require('../../chunks/bundle-om7V4Kmd.js');
var ui_MessageInput = require('../../ui/MessageInput.js');
var OpenChannel_context = require('../../chunks/bundle-gjgpE5zc.js');
require('../../chunks/bundle-08DJamJs.js');
require('../../chunks/bundle-ubmIpm9y.js');
require('../../chunks/bundle-H3iUL9jU.js');
require('../../chunks/bundle-Ok99sReN.js');
require('../../chunks/bundle-_vyDAzUb.js');
require('../../ui/IconButton.js');
require('../../ui/Button.js');
require('../../chunks/bundle-WWYVAaVT.js');
require('../../chunks/bundle-a3DGXthf.js');
require('dompurify');
require('../../chunks/bundle-dwD6gaHJ.js');
require('../../chunks/bundle-0LtiaxJx.js');
require('../../chunks/bundle-8XvxyLQN.js');
require('../../ui/Icon.js');
require('../../chunks/bundle-Kwa0c8dM.js');
require('../../useSendbirdStateContext.js');
require('../../withSendbird.js');
require('../../chunks/bundle-eG-yFfLY.js');
require('@sendbird/chat/groupChannel');
require('../../utils/message/getOutgoingMessageState.js');
require('../../chunks/bundle-eg9jnWPm.js');
require('../../chunks/bundle-ZpJLlgNE.js');
require('../../chunks/bundle-uubJJzRW.js');
require('../../chunks/bundle-EsJltkVm.js');
require('../../chunks/bundle-BMB3xh2i.js');
require('@sendbird/chat');
require('@sendbird/chat/openChannel');
require('../../chunks/bundle-jP-1bn23.js');
require('../../chunks/bundle-49TaYIAY.js');
require('../../chunks/bundle-DgcTM2HW.js');
require('../../hooks/useModal.js');
require('../../chunks/bundle--t70CDfb.js');
require('react-dom');
require('../../chunks/bundle-lHnGN-3L.js');
require('../../chunks/bundle--yF0PJ6E.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
