// type that is used to define a chat message export type TMessage = { id: string; text: string; timestamp: Date; type: "text" | "image" | "video" | "audio" | "file" | "code"; status?: "pending" | "sent" | "received" | "read"; system?: boolean; reply?: boolean; quotedMessageId?: string; authorId?: string; uri?: string; language?: string; // For code messages }; // type that is used to define a chat partecipant export type TAuthor = { id: string; name: string; avatar?: string; status?: "online" | "offline" | "away" | "busy"; me?: boolean; isAI?: boolean; // Special flag for AI author }; export type Component = { id?: string; style?: string; messages: TMessage[]; authors: TAuthor[]; options?: { showTimestamp?: boolean; showAvatar?: boolean; showName?: boolean; bubbles?: boolean; }; actions?: { icon: string; name: string; }[] }; export type Events = { action: { messageId: string; action: string }; };