@sendbird/uikit-react-native
Version:
Sendbird UIKit for React Native: A feature-rich and customizable chat UI kit with messaging, channel management, and user authentication.
34 lines • 1.51 kB
JavaScript
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React, { useContext } from 'react';
import { getGroupChannelChatAvailableState } from '@sendbird/uikit-utils';
import ChannelInput from '../../../components/ChannelInput';
import { GroupChannelThreadContexts } from '../module/moduleContext';
const GroupChannelThreadInput = _ref => {
let {
inputDisabled,
...props
} = _ref;
const {
channel,
keyboardAvoidOffset = 0,
messageToEdit,
setMessageToEdit,
parentMessage
} = useContext(GroupChannelThreadContexts.Fragment);
const chatAvailableState = getGroupChannelChatAvailableState(channel);
return /*#__PURE__*/React.createElement(ChannelInput, _extends({
channel: channel,
messageToEdit: messageToEdit,
setMessageToEdit: setMessageToEdit,
messageForThread: parentMessage,
keyboardAvoidOffset: keyboardAvoidOffset,
inputMuted: chatAvailableState.muted,
inputFrozen: chatAvailableState.frozen,
inputDisabled: inputDisabled ?? chatAvailableState.disabled,
MessageToReplyPreview: () => {
return null;
}
}, props));
};
export default /*#__PURE__*/React.memo(GroupChannelThreadInput);
//# sourceMappingURL=GroupChannelThreadInput.js.map