import React__default, { useContext } from 'react';
import { L as LocalizationContext } from '../../chunks/bundle-Bx5vhTbU.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../chunks/bundle-Bi8Wfc2I.js';
import '../../chunks/bundle-C8im5l9B.js';
import '../../chunks/bundle-C1ds4cil.js';
import '../../chunks/bundle-7oF7KbGv.js';
import '../../chunks/bundle-QxUVt4Ms.js';
import '../../chunks/bundle-BOSnopxk.js';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../chunks/bundle-LYAWKk4n.js';
import '../../chunks/bundle-DO1vNias.js';
import 'dompurify';
import '../../chunks/bundle-B5N2u5f-.js';
import '../../chunks/bundle-DSOf9RKe.js';
import '../../chunks/bundle-DQ2q-zNM.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-ByvmbZD0.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';
import '../../chunks/bundle-BWCGFXhj.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-DpGWywZ5.js';
import '../../chunks/bundle-B7barEsR.js';
import '../../chunks/bundle-BKho3Uub.js';
import '../../chunks/bundle-BWuyd0AD.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../chunks/bundle-BJ46V6XQ.js';
import '../../chunks/bundle-3amhHjNa.js';
import '../../chunks/bundle-CT8ZXUi2.js';
import '../../chunks/bundle-C4Z-NWqF.js';
import 'react-dom';
import '../../chunks/bundle-Diqj6For.js';
import '@sendbird/uikit-tools';
import 'css-vars-ponyfill';
import '../../chunks/bundle-CIwVkd-E.js';
import '../../chunks/bundle-CD9AzC6s.js';
import '../../chunks/bundle-BbWD2VuS.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
