import type { Reducer } from 'react'; import type { ChannelState, OneChatMessage } from '../../context/ChannelStateContext'; import type { Channel, DefaultOneChatGenerics, MessageResponse, ChannelState as OneChatChannelState } from '../../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: OneChatMessage[]; type: 'loadMoreFinished'; } | { hasMoreNewer: boolean; messages: OneChatMessage[]; type: 'loadMoreNewerFinished'; } | { threadHasMore: boolean; threadMessages: Array['formatMessage']>>; type: 'loadMoreThreadFinished'; } | { channel: Channel; message: OneChatMessage; type: 'openThread'; } | { error: Error; type: 'setError'; } | { loadingMore: boolean; type: 'setLoadingMore'; } | { loadingMoreNewer: boolean; type: 'setLoadingMoreNewer'; } | { message: OneChatMessage; 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