import React__default, { useContext } from 'react';
import { L as LocalizationContext } from '../../chunks/bundle-l_QLKq1Y.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../chunks/bundle-BoZwl2OL.js';
import '../../chunks/bundle-B8Grfnrx.js';
import '../../chunks/bundle-Y2KBbxRr.js';
import '../../chunks/bundle-BYOddwmS.js';
import '../../chunks/bundle-DXneAdAp.js';
import '../../chunks/bundle-BciLDE6M.js';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../chunks/bundle-HspRRkmy.js';
import '../../chunks/bundle-DwLTEVMK.js';
import 'dompurify';
import '../../chunks/bundle-Dp_oW1ks.js';
import '../../chunks/bundle-Cn2czFA-.js';
import '../../chunks/bundle-4w9Y7uxA.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-CDcu1I4f.js';
import '../../chunks/bundle-CgLhYjm5.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-BTxw_tIt.js';
import '../../chunks/bundle-De-3zaYV.js';
import '../../chunks/bundle-DYBTopZK.js';
import '../../chunks/bundle-Ob7Cw3V-.js';
import '../../chunks/bundle-DT1VcdMs.js';
import '../../chunks/bundle-I25ah_Bv.js';
import '../../chunks/bundle-C4OmfIXk.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../chunks/bundle-BYqblmEM.js';
import '../../chunks/bundle-Djq12iSf.js';
import '../../chunks/bundle--1cImOGd.js';
import '../../chunks/bundle-CTkGIdt8.js';
import '../../chunks/bundle-CSDZhWAY.js';
import '../../chunks/bundle-C_ngoQD_.js';
import '../../hooks/useModal.js';
import '../../chunks/bundle-LnGQMQVt.js';
import 'react-dom';
import '../../chunks/bundle-yKqHFFfz.js';

var OpenChannelInput = React__default.forwardRef(function (props, ref) {
    var _a = useOpenChannelContext(), currentOpenChannel = _a.currentOpenChannel, disabled = _a.disabled, handleSendMessage = _a.handleSendMessage, handleFileUpload = _a.handleFileUpload, amIMuted = _a.amIMuted;
    var channel = currentOpenChannel;
    var stringSet = useContext(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.createElement("div", { className: "sendbird-openchannel-footer" },
        React__default.createElement(MessageInput, { channel: currentOpenChannel, ref: ref, value: value, disabled: disabled, isVoiceMessageEnabled: false, onSendMessage: handleSendMessage, onFileUpload: handleFileUpload, placeholder: getPlaceHolderString() })));
});

export { OpenChannelInput as default };
//# sourceMappingURL=OpenChannelInput.js.map
