import React__default, { useContext } from 'react';
import { L as LocalizationContext } from '../../chunks/bundle-BBjosDA0.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../chunks/bundle-c1LUbaVa.js';
import '../../chunks/bundle-jy6_UG14.js';
import '../../chunks/bundle-ULVw0l0r.js';
import '../../chunks/bundle-BA7tv0JB.js';
import '../../chunks/bundle-GGE6HRof.js';
import '../../chunks/bundle-poK2Vr1v.js';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../chunks/bundle-I8JFwttJ.js';
import '../../chunks/bundle-62ej9afV.js';
import 'dompurify';
import '../../chunks/bundle-zV8TJWvL.js';
import '../../chunks/bundle-4GPpeoNf.js';
import '../../chunks/bundle-iwZaUd9o.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-cA_r9HRx.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';
import '../../chunks/bundle-N9hMnIRl.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-aKXnhi3A.js';
import '../../chunks/bundle-IRlSmJVg.js';
import '../../chunks/bundle-vOT5acXc.js';
import '../../chunks/bundle-NwZvowyL.js';
import '../../chunks/bundle-nlOgiAcu.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../chunks/bundle-YoWLsJ0C.js';
import '../../chunks/bundle-8JX3bIpj.js';
import '../../chunks/bundle-jDjj3eHU.js';
import '../../hooks/useModal.js';
import '../../chunks/bundle-cvTUkQV_.js';
import 'react-dom';
import '../../chunks/bundle-r9j_eCHc.js';
import '../../chunks/bundle-MBrlu_LK.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
