import React from 'react'; import type { EmojiData, NimbleEmojiIndex } from 'emoji-mart'; import type { FileLike } from 'react-file-utils'; import type { Attachment, Message, UserResponse } from 'stream-chat'; import type { MessageInputProps } from '../MessageInput'; import type { CustomTrigger, DefaultStreamChatGenerics } from '../../../types/types'; export declare type FileUpload = { file: { name: string; lastModified?: number; lastModifiedDate?: Date; size?: number; type?: string; uri?: string; }; id: string; state: 'finished' | 'failed' | 'uploading'; thumb_url?: string; url?: string; }; export declare type ImageUpload = { file: { name: string; height?: number; lastModified?: number; lastModifiedDate?: Date; size?: number; type?: string; uri?: string; width?: number; }; id: string; state: 'finished' | 'failed' | 'uploading'; previewUri?: string; url?: string; } & Pick, 'og_scrape_url' | 'title' | 'title_link' | 'author_name' | 'text'>; export declare type MessageInputState = { attachments: Attachment[]; emojiPickerIsOpen: boolean; fileOrder: string[]; fileUploads: Record; imageOrder: string[]; imageUploads: Record; mentioned_users: UserResponse[]; setText: (text: string) => void; text: string; }; declare type SetEmojiPickerIsOpenAction = { type: 'setEmojiPickerIsOpen'; value: boolean; }; declare type SetTextAction = { getNewText: (currentStateText: string) => string; type: 'setText'; }; declare type ClearAction = { type: 'clear'; }; declare type SetImageUploadAction = { id: string; type: 'setImageUpload'; file?: File | FileLike; previewUri?: string; state?: string; url?: string; }; declare type SetFileUploadAction = { id: string; type: 'setFileUpload'; file?: File; state?: string; thumb_url?: string; url?: string; }; declare type RemoveImageUploadAction = { id: string; type: 'removeImageUpload'; }; declare type RemoveFileUploadAction = { id: string; type: 'removeFileUpload'; }; declare type AddMentionedUserAction = { type: 'addMentionedUser'; user: UserResponse; }; export declare type MessageInputReducerAction = SetEmojiPickerIsOpenAction | SetTextAction | ClearAction | SetImageUploadAction | SetFileUploadAction | RemoveImageUploadAction | RemoveFileUploadAction | AddMentionedUserAction; export declare type MessageInputHookProps = { closeEmojiPicker: React.MouseEventHandler; emojiPickerRef: React.MutableRefObject; handleChange: React.ChangeEventHandler; handleEmojiKeyDown: React.KeyboardEventHandler; handleSubmit: (event: React.BaseSyntheticEvent, customMessageData?: Partial>) => void; insertText: (textToInsert: string) => void; isUploadEnabled: boolean; maxFilesLeft: number; numberOfUploads: number; onPaste: (event: React.ClipboardEvent) => void; onSelectEmoji: (emoji: EmojiData) => void; onSelectUser: (item: UserResponse) => void; openEmojiPicker: React.MouseEventHandler; removeFile: (id: string) => void; removeImage: (id: string) => void; textareaRef: React.MutableRefObject; uploadFile: (id: string) => void; uploadImage: (id: string) => void; uploadNewFiles: (files: FileList | File[]) => void; emojiIndex?: NimbleEmojiIndex; }; export declare type CommandsListState = { closeCommandsList: () => void; openCommandsList: () => void; showCommandsList: boolean; }; export declare type MentionsListState = { closeMentionsList: () => void; openMentionsList: () => void; showMentionsList: boolean; }; /** * hook for MessageInput state */ export declare const useMessageInputState: (props: MessageInputProps) => MessageInputState & MessageInputHookProps & CommandsListState & MentionsListState; export {}; //# sourceMappingURL=useMessageInputState.d.ts.map