import React, { PropsWithChildren } from 'react'; import type { Channel, ChannelConfigWithInfo, MessageResponse, Mute, ChannelState as StreamChannelState } from 'open-chat-js'; import type { ChannelUnreadUiState, DefaultStreamChatGenerics, GiphyVersions, ImageAttachmentSizeHandler, UnknownType, VideoAttachmentSizeHandler } from '../types/types'; import type { URLEnrichmentConfig } from '../components/MessageInput/hooks/useLinkPreviews'; export type ChannelNotifications = Array<{ id: string; text: string; type: 'success' | 'error'; }>; export type StreamMessage = ReturnType['formatMessage']> | MessageResponse; export type ChannelState = { suppressAutoscroll: boolean; error?: Error | null; hasMore?: boolean; hasMoreNewer?: boolean; highlightedMessageId?: string; loading?: boolean; loadingMore?: boolean; loadingMoreNewer?: boolean; members?: StreamChannelState['members']; messages?: StreamMessage[]; pinnedMessages?: StreamMessage[]; quotedMessage?: StreamMessage; read?: StreamChannelState['read']; thread?: StreamMessage | null; threadHasMore?: boolean; threadLoadingMore?: boolean; threadMessages?: StreamMessage[]; threadSuppressAutoscroll?: boolean; typing?: StreamChannelState['typing']; watcherCount?: number; watchers?: StreamChannelState['watchers']; }; export type ChannelStateContextValue = Omit, 'typing'> & { channel: Channel; channelCapabilities: Record; channelConfig: ChannelConfigWithInfo | undefined; imageAttachmentSizeHandler: ImageAttachmentSizeHandler; multipleUploads: boolean; notifications: ChannelNotifications; shouldGenerateVideoThumbnail: boolean; videoAttachmentSizeHandler: VideoAttachmentSizeHandler; acceptedFiles?: string[]; channelUnreadUiState?: ChannelUnreadUiState; debounceURLEnrichmentMs?: URLEnrichmentConfig['debounceURLEnrichmentMs']; dragAndDropWindow?: boolean; enrichURLForPreview?: URLEnrichmentConfig['enrichURLForPreview']; findURLFn?: URLEnrichmentConfig['findURLFn']; giphyVersion?: GiphyVersions; maxNumberOfFiles?: number; mutes?: Array>; onLinkPreviewDismissed?: URLEnrichmentConfig['onLinkPreviewDismissed']; watcher_count?: number; }; export declare const ChannelStateContext: React.Context | undefined>; export declare const ChannelStateProvider: ({ children, value, }: React.PropsWithChildren<{ value: ChannelStateContextValue; }>) => React.JSX.Element; export declare const useChannelStateContext: (componentName?: string) => ChannelStateContextValue; /** * Typescript currently does not support partial inference, so if ChannelStateContext * typing is desired while using the HOC withChannelStateContext, the Props for the * wrapped component must be provided as the first generic. */ export declare const withChannelStateContext:

(Component: React.ComponentType

) => { (props: Omit): React.JSX.Element; displayName: string; }; //# sourceMappingURL=ChannelStateContext.d.ts.map