import { HTMLAttributes } from 'react'; import { ChatListStyles } from './styles'; import { ChatObject } from '../../../interfaces'; import { ChatFormProps } from './ChatForm/props'; import { ChatCardProps } from './ChatCard/props'; export interface ChatListProps extends HTMLAttributes, ChatListStyles { // Data chats: ChatObject[]; activeChatId?: number; username?: string; timezoneOffset?: number; // State isLoading?: boolean; hasMoreChats?: boolean; // Hooks onChatCardClick?: (chatId: number) => Promise; onChatFormSubmit?: (title: string) => Promise; onChatLoaderShow?: () => Promise; // Render Functions renderChatList?: ( props: ChatListProps ) => JSX.Element | Element | React.FC; renderChatForm?: ( props: ChatFormProps ) => JSX.Element | Element | React.FC; renderChatCard?: ( props: ChatCardProps ) => JSX.Element | Element | React.FC; }