import React, { PropsWithChildren } from 'react'; import type { OneChatMessage } from './ChannelStateContext'; import type { ChannelStateReducerAction } from '../components/Channel/channelState'; import type { CustomMentionHandler } from '../components/Message/hooks/useMentionsHandler'; import type { APIErrorResponse, Attachment, DefaultOneChatGenerics, ErrorFromResponse, Message, UnknownType, UpdatedMessage, UpdateMessageAPIResponse, UserResponse } from '../types'; export declare type MessageAttachments = Array>; export declare type MessageToSend = { attachments?: MessageAttachments; error?: ErrorFromResponse; errorStatusCode?: number; id?: string; mentioned_users?: UserResponse[]; parent?: OneChatMessage; parent_id?: string; status?: string; text?: string; }; export declare type RetrySendMessage = (message: OneChatMessage) => Promise; export declare type ChannelActionContextValue = { addNotification: (text: string, type: 'success' | 'error') => void; closeThread: (event?: React.BaseSyntheticEvent) => void; dispatch: React.Dispatch>; editMessage: (message: UpdatedMessage) => Promise | void>; jumpToLatestMessage: () => Promise; jumpToMessage: (messageId: string, limit?: number) => Promise; loadMore: (limit?: number) => Promise; loadMoreNewer: (limit?: number) => Promise; loadMoreThread: () => Promise; onMentionsClick: CustomMentionHandler; onMentionsHover: CustomMentionHandler; openThread: (message: OneChatMessage, event?: React.BaseSyntheticEvent) => void; removeMessage: (message: OneChatMessage) => void; retrySendMessage: RetrySendMessage; sendMessage: (message: MessageToSend, customMessageData?: Partial>) => Promise; setQuotedMessage: React.Dispatch | undefined>>; updateMessage: (message: OneChatMessage) => void; }; export declare const ChannelActionContext: React.Context | undefined>; export declare const ChannelActionProvider: ({ children, value, }: React.PropsWithChildren<{ value: ChannelActionContextValue; }>) => JSX.Element; export declare const useChannelActionContext: (componentName?: string) => ChannelActionContextValue; /** * Typescript currently does not support partial inference, so if ChannelActionContext * typing is desired while using the HOC withChannelActionContext, the Props for the * wrapped component must be provided as the first generic. */ export declare const withChannelActionContext:

(Component: React.ComponentType

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