import React__default, { useContext } from 'react';
import { L as LocalizationContext } from '../../chunks/bundle-C_RTy-wB.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../chunks/bundle-C3_a0vzo.js';
import '../../chunks/bundle-CyKcXwxv.js';
import '../../chunks/bundle-xzHlqm91.js';
import '../../chunks/bundle-NEplso7H.js';
import '../../chunks/bundle-N7XRO_Ma.js';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../chunks/bundle-bz4PqMYo.js';
import '../../chunks/bundle-CdOhleNh.js';
import 'dompurify';
import '../../chunks/bundle-2Qim3Dap.js';
import '../../chunks/bundle-fX_liw7W.js';
import '../../chunks/bundle-rk3bNfCF.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-B43BrwWe.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';
import '../../chunks/bundle-DCvGHvPz.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-BFKFmP-d.js';
import '../../chunks/bundle-DAYMi6vw.js';
import '../../chunks/bundle-vddg8rUR.js';
import '../../chunks/bundle-CXmeegua.js';
import '../../chunks/bundle-DV19ISeX.js';
import '@sendbird/uikit-tools';
import '../../chunks/bundle-DIM08oup.js';
import 'react-dom';
import '../../chunks/bundle-yFfkfO0O.js';
import 'css-vars-ponyfill';
import '@sendbird/chat';
import '../../chunks/bundle-BUQ58hWb.js';
import '@sendbird/chat/openChannel';
import '../../chunks/bundle-CKwMZR9c.js';
import '../../chunks/bundle-Bien0gJP.js';
import '../../ui/SortByRow.js';
import '../../chunks/bundle-ByOQ0ql4.js';
import '../../chunks/bundle-BCRvYX9G.js';
import '../../chunks/bundle-BAACXDmZ.js';
import '../../chunks/bundle-Dmj05jBl.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
