import React__default, { useContext } from 'react';
import { L as LocalizationContext } from '../../chunks/bundle-zOkaSZl3.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../chunks/bundle-scS3KeKI.js';
import '../../chunks/bundle-_NUeDv_m.js';
import '../../chunks/bundle-YOec1wfw.js';
import '../../chunks/bundle-0vtSUcHY.js';
import '../../chunks/bundle-K3gy6I7U.js';
import '../../chunks/bundle-QUJKjMCy.js';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../chunks/bundle-RzWTDZDo.js';
import '../../chunks/bundle-fNYexgBr.js';
import 'dompurify';
import '../../chunks/bundle-72sPkBu4.js';
import '../../chunks/bundle-5x-SH0ln.js';
import '../../chunks/bundle--M9av9I5.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-4ab6nIKe.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';
import '../../chunks/bundle-hrqkDKRD.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-9wFvMqxF.js';
import '../../chunks/bundle-2xEG_fol.js';
import '../../chunks/bundle-U_0F9z8c.js';
import '../../chunks/bundle-TlXrstq8.js';
import '../../chunks/bundle-KwnXXB-s.js';
import '@sendbird/chat';
import '@sendbird/chat/openChannel';
import '../../chunks/bundle-brky8TnE.js';
import '../../chunks/bundle-Y0R5tada.js';
import '../../chunks/bundle-TEGbbRiE.js';
import '../../hooks/useModal.js';
import '../../chunks/bundle-92kzAxsw.js';
import 'react-dom';
import '../../chunks/bundle-1XQGq5tE.js';
import '../../chunks/bundle-e5lT4U6_.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
