import { StyleProp, ViewStyle, TextStyle } from 'react-native'; import type { SenderType } from '../DbChatAvatar/types'; /** 消息类型 */ export type MessageType = 'text' | 'image' | 'card' | 'stream' | 'system' | 'code' | 'markdown' | 'conversation' | 'question-list'; /** 消息方向 */ export type MessageDirection = 'left' | 'right'; /** 消息状态 */ export type MessageStatus = 'sending' | 'sent' | 'read' | 'failed'; /** 气泡组件 Props */ export interface DbChatBubbleProps { /** 消息类型 */ type: MessageType; /** 消息方向 */ direction: MessageDirection; /** 发送者类型 */ senderType: SenderType; /** 文本内容 */ content: string; /** AI 流式输出中 */ isStreaming?: boolean; /** 消息状态 */ status?: MessageStatus; /** 是否已读 */ isRead?: boolean; /** 是否显示状态图标(失败/已读/未读),默认 true */ showStatus?: boolean; /** 是否加载中 */ isLoading?: boolean; /** 自定义气泡样式 */ style?: StyleProp; /** 自定义文本样式 */ textStyle?: StyleProp; /** 重试回调 */ onRetry?: () => void; } export type { SenderType };