import React__default, { useContext } from 'react';
import { L as LocalizationContext } from '../../chunks/bundle-BPLoGpIy.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../chunks/bundle-DHs6ktbB.js';
import '../../chunks/bundle-B9I7KCZ2.js';
import '../../chunks/bundle-BwafidOs.js';
import '../../chunks/bundle-CMgJTzYH.js';
import '../../chunks/bundle-DqJ40nCa.js';
import '../../chunks/bundle-De1BnkR0.js';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../chunks/bundle-B1gHpFXu.js';
import '../../chunks/bundle-D3w6q-9W.js';
import 'dompurify';
import '../../chunks/bundle-BT8XMu5e.js';
import '../../chunks/bundle-CpcTBaG-.js';
import '../../chunks/bundle-BQqQX3na.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-B628FXKZ.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';
import '../../chunks/bundle-BGoByD2z.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-ByuZy4m8.js';
import '../../chunks/bundle-DnVyKahm.js';
import '../../chunks/bundle-bbk4ulub.js';
import '../../chunks/bundle-DUd6AS_D.js';
import '../../chunks/bundle-D-_vevD1.js';
import '../../chunks/bundle-D6I-uHp_.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../chunks/bundle-B97onQ-B.js';
import '../../chunks/bundle-DjAkc3FK.js';
import '../../chunks/bundle-DVCGbhaI.js';
import '../../chunks/bundle-DAF0GGlr.js';
import 'react-dom';
import '../../chunks/bundle-BydEbpDQ.js';
import '@sendbird/uikit-tools';
import 'css-vars-ponyfill';
import '../../chunks/bundle-jVDgtxRn.js';
import '../../chunks/bundle-Mfnn12A9.js';
import '../../chunks/bundle-BfonFE4n.js';
import '../../ui/SortByRow.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
