import React__default, { useContext } from 'react';
import { L as LocalizationContext } from '../../chunks/bundle-Del33VzI.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../chunks/bundle-D5hQctFB.js';
import '../../chunks/bundle-yl5d1NoZ.js';
import '../../chunks/bundle-C1dqPUnT.js';
import '../../chunks/bundle-BZGITC2g.js';
import '../../chunks/bundle-BNtO7aXk.js';
import '../../chunks/bundle-BEx1sWnS.js';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../chunks/bundle-viBng0Kh.js';
import '../../chunks/bundle-CN_mZmg1.js';
import 'dompurify';
import '../../chunks/bundle-D6b2YGeE.js';
import '../../chunks/bundle-B6udMinl.js';
import '../../chunks/bundle-Cc1gzgza.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-MlG9piGf.js';
import '../../chunks/bundle-vmZ9LoYK.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-DgosLQK9.js';
import '../../chunks/bundle-DEuCwnTn.js';
import '../../chunks/bundle-fdEQfX2s.js';
import '../../chunks/bundle-CqLLOVG5.js';
import '../../chunks/bundle-BwvurfUT.js';
import '../../chunks/bundle-i_3w58Zd.js';
import '../../chunks/bundle-BUYU9H94.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../chunks/bundle-B0s_McF0.js';
import '../../chunks/bundle-CM73CDTO.js';
import '../../chunks/bundle-BOykFtQ3.js';
import '../../chunks/bundle-DGh2T5IL.js';
import '../../chunks/bundle-BtCCRSPc.js';
import '../../chunks/bundle-Dl_v8XoN.js';
import '../../hooks/useModal.js';
import '../../chunks/bundle-CtQtfJlT.js';
import 'react-dom';
import '../../chunks/bundle-DBhJIxHw.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
