import type { Reducer } from 'react'; import type { Channel, MessageResponse, ChannelState as StreamChannelState } from 'stream-chat'; import type { ChannelState, StreamMessage } from '../../context/ChannelStateContext'; import type { DefaultStreamChatGenerics } from '../../types/types'; export declare type ChannelStateReducerAction = { type: 'closeThread'; } | { type: 'clearHighlightedMessage'; } | { channel: Channel; type: 'copyMessagesFromChannel'; parentId?: string | null; } | { channel: Channel; type: 'copyStateFromChannelOnEvent'; } | { hasMoreNewer: boolean; highlightedMessageId: string; type: 'jumpToMessageFinished'; } | { channel: Channel; type: 'initStateFromChannel'; } | { hasMore: boolean; messages: StreamMessage[]; type: 'loadMoreFinished'; } | { hasMoreNewer: boolean; messages: StreamMessage[]; type: 'loadMoreNewerFinished'; } | { threadHasMore: boolean; threadMessages: Array['formatMessage']>>; type: 'loadMoreThreadFinished'; } | { channel: Channel; message: StreamMessage; type: 'openThread'; } | { error: Error; type: 'setError'; } | { loadingMore: boolean; type: 'setLoadingMore'; } | { loadingMoreNewer: boolean; type: 'setLoadingMoreNewer'; } | { message: StreamMessage; type: 'setThread'; } | { channel: Channel; type: 'setTyping'; } | { type: 'startLoadingThread'; } | { channel: Channel; message: MessageResponse; type: 'updateThreadOnEvent'; } | { type: 'jumpToLatestMessage'; }; export declare type ChannelStateReducer = Reducer, ChannelStateReducerAction>; export declare const channelReducer: (state: ChannelState, action: ChannelStateReducerAction) => ChannelState; export declare const initialState: { error: null; hasMore: boolean; hasMoreNewer: boolean; loading: boolean; loadingMore: boolean; members: {}; messages: never[]; pinnedMessages: never[]; read: {}; suppressAutoscroll: boolean; thread: null; threadHasMore: boolean; threadLoadingMore: boolean; threadMessages: never[]; threadSuppressAutoscroll: boolean; typing: {}; watcherCount: number; watchers: {}; }; //# sourceMappingURL=channelState.d.ts.map