import React from 'react'

export interface Message {
  id: number
  content: string
  isSelf: boolean
  type: 'text' | 'image' | 'file' | 'video' | 'notification'
  timestamp: number
  title?: string
  actionUrl?: string
  actionText?: string
  messageType?: 'MESSAGE' | 'NOTIFICATION'
  content_type?: 'TEXT' | 'IMAGE' | 'VIDEO' | 'FILE' | 'USER_NOTIFICATION'
  size?: number
  receiver_id?: number
  sender_id?: number
  app_id?: number
}

export interface Contact {
  id: number
  name: string
  avatar: React.ReactNode
  lastMessage?: string
  lastMessageTime?: string
  /** 原始时间戳（ms），用于「近期」会话排序等 */
  lastMessageAt?: number
  unreadCount: number
  remarks?: string | null
}

export interface SearchResult {
  message: Message
  contactId: number
  contactName: string
}
