@uimkit/uikit-react
Version:
<img style="width:64px" src="https://mgmt.uimkit.chat/media/img/avatar.png"/>
31 lines (28 loc) • 1.68 kB
JavaScript
import { __rest, __assign } from 'tslib';
import { useMemo } from 'react';
import '../../../context/TranslationContext.js';
import '../../../context/UIKitContext.js';
import '../../../context/ComponentContext.js';
import '../../../context/ChatActionContext.js';
import '../../../context/MessageInputContext.js';
import '../../../context/UIMessageContext.js';
import '../../../context/ChatStateContext.js';
import '../../../types/models.js';
import '../../../types/events.js';
function useCreateChatStateContext(props) {
var client = props.client, conversation = props.conversation, chatConfig = props.chatConfig, messageListRef = props.messageListRef, messageConfig = props.messageConfig, cloudCustomData = props.cloudCustomData, UIMessageInputConfig = props.UIMessageInputConfig, UIMessageListConfig = props.UIMessageListConfig, state = __rest(props, ["client", "conversation", "chatConfig", "messageListRef", "messageConfig", "cloudCustomData", "UIMessageInputConfig", "UIMessageListConfig"]);
var chatStateContext = useMemo(function () { return (__assign({ client: client, conversation: conversation, chatConfig: chatConfig, messageListRef: messageListRef, messageConfig: messageConfig, cloudCustomData: cloudCustomData, UIMessageInputConfig: UIMessageInputConfig, UIMessageListConfig: UIMessageListConfig }, state)); }, [
client,
conversation,
chatConfig,
messageListRef,
messageConfig,
cloudCustomData,
UIMessageInputConfig,
UIMessageListConfig,
state,
]);
return chatStateContext;
}
export { useCreateChatStateContext as default };
//# sourceMappingURL=useCreateChatStateContext.js.map