import type { PropsWithChildren } from 'react'; import React from 'react'; import type { DeleteMessageOptions, LocalMessage, Message, MessageResponse, SendMessageOptions, UpdateMessageAPIResponse, UpdateMessageOptions } from 'stream-chat'; import type { ChannelStateReducerAction } from '../components/Channel/channelState'; import type { CustomMentionHandler } from '../components/Message/hooks/useMentionsHandler'; import type { ChannelUnreadUiState } from '../types/types'; export type MarkReadWrapperOptions = { /** * Signal, whether the `channelUnreadUiState` should be updated. * By default, the local state update is prevented when the Channel component is mounted. * This is in order to keep the UI indicating the original unread state, when the user opens a channel. */ updateChannelUiUnreadState?: boolean; }; export type RetrySendMessage = (message: LocalMessage) => Promise; export type ChannelActionContextValue = { closeThread: (event?: React.BaseSyntheticEvent) => void; deleteMessage: (message: LocalMessage, options?: DeleteMessageOptions) => Promise; dispatch: React.Dispatch; editMessage: (message: LocalMessage | MessageResponse, options?: UpdateMessageOptions) => Promise; jumpToFirstUnreadMessage: (queryMessageLimit?: number, highlightDuration?: number) => Promise; jumpToLatestMessage: () => Promise; jumpToMessage: (messageId: string, limit?: number, highlightDuration?: number) => Promise; loadMore: (limit?: number) => Promise; loadMoreNewer: (limit?: number) => Promise; loadMoreThread: () => Promise; markRead: (options?: MarkReadWrapperOptions) => void; onMentionsClick: CustomMentionHandler; onMentionsHover: CustomMentionHandler; openThread: (message: LocalMessage, event?: React.BaseSyntheticEvent) => void; removeMessage: (message: LocalMessage) => void; retrySendMessage: RetrySendMessage; sendMessage: (params: { localMessage: LocalMessage; message: Message; options?: SendMessageOptions; }) => Promise; setChannelUnreadUiState: React.Dispatch>; updateMessage: (message: MessageResponse | LocalMessage) => void; }; export declare const ChannelActionContext: React.Context; export declare const ChannelActionProvider: ({ children, value, }: PropsWithChildren<{ value: ChannelActionContextValue; }>) => import("react/jsx-runtime").JSX.Element; export declare const useChannelActionContext: (componentName?: string) => ChannelActionContextValue; //# sourceMappingURL=ChannelActionContext.d.ts.map