import { IMessageList, IMessageListItem, IMessageModelList } from './typing'; export interface IUseMessageListProps { messageList?: IMessageList; incomingAvatarUrl?: string; outgoingAvatarUrl?: string; } export interface IUseMessageListReturn { /**当前的消息列表 */ currentMessageList: IMessageList; /** 处理过后的消息列表,扔给Chat渲染*/ messageListForChat: IMessageModelList; /**设置消息列表 */ setMessageList: (messageList: IMessageList) => void; /**添加下标为index位置处消息 */ addMessage: (message: IMessageListItem, index?: number) => boolean; /**更新下标为index位置处消息 */ removeMessage: (index: number) => boolean; /**获取key为messageKey的消息 */ getMessage: (messageKey: number, offset?: number) => { message: IMessageListItem; index: number; }; } export declare const useMessageList: ({ messageList, incomingAvatarUrl, outgoingAvatarUrl, }: IUseMessageListProps) => IUseMessageListReturn;