import { ChatClient } from '@rchat/client'; import { createSafeContext } from '@sirse-dev/safe-context'; import type { ContainerComponentProps, ItemComponentType, ItemKey, PlaceholderComponentType } from '../EndlessList'; import type { ComponentType } from 'react'; export type RChatContextType = { client: ChatClient; MessageComponent: ItemComponentType; PlaceholderComponent: PlaceholderComponentType; ContainerComponent: ComponentType; triggerDistance: number; itemKey: ItemKey; compareItems: (first: TMessageType, second: TMessageType) => number; }; export const RChatContext = createSafeContext>();