import React__default, { useContext } from 'react';
import { L as LocalizationContext } from '../../chunks/bundle-CfVl8s4A.js';
import MessageInput from '../../ui/MessageInput.js';
import { u as useOpenChannelContext } from '../../chunks/bundle-JA614av1.js';
import '../../chunks/bundle-BL7mChau.js';
import '../../chunks/bundle-DQaFQR2q.js';
import '../../chunks/bundle-DV0yjj9U.js';
import '../../chunks/bundle-T1C3QunC.js';
import '../../ui/IconButton.js';
import '../../ui/Button.js';
import '../../chunks/bundle-BoHJWlEb.js';
import '../../chunks/bundle-CbEx5Qjw.js';
import 'dompurify';
import '../../chunks/bundle-Cdm9wGwJ.js';
import '../../chunks/bundle-SJt9ZQEH.js';
import '../../chunks/bundle-DuBNYf2a.js';
import '../../ui/Icon.js';
import '../../chunks/bundle-c8Tan9dw.js';
import '../../useSendbirdStateContext.js';
import '../../withSendbird.js';
import '../../chunks/bundle-ca6IMmD9.js';
import '@sendbird/chat/groupChannel';
import '../../utils/message/getOutgoingMessageState.js';
import '../../chunks/bundle-RX4SHzNN.js';
import '../../chunks/bundle-Cj_Dxz14.js';
import '../../chunks/bundle-DOfvZYT8.js';
import '../../chunks/bundle-095SzdU2.js';
import '../../chunks/bundle-BtIszx7q.js';
import '@sendbird/uikit-tools';
import '../../chunks/bundle-PPnIQFif.js';
import 'react-dom';
import '../../chunks/bundle-Bvh73TsV.js';
import 'css-vars-ponyfill';
import '@sendbird/chat';
import '../../chunks/bundle-0P_11xTV.js';
import '@sendbird/chat/openChannel';
import '../../chunks/bundle-hFyf4W91.js';
import '../../chunks/bundle-BjZ9zlI7.js';
import '../../ui/SortByRow.js';
import '../../chunks/bundle-Cf9I1_PI.js';
import '../../chunks/bundle-CmhRN4oW.js';
import '../../chunks/bundle-DF5wKiiH.js';
import '../../chunks/bundle-BJvmAi6P.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
