export type LeadStatus = "open" | "contacted" | "pending" | "closed" | "ignored"
export type UserRole = "super_admin" | "admin" | "sales_user" | "developer"

export interface User {
  id: string
  name: string
  email: string
  role: UserRole
  active: boolean
  avatar: string
  createdAt: string
}

export interface Lead {
  id: string
  companyName: string
  contactName: string
  email: string
  phone: string
  source: string
  description: string
  status: LeadStatus
  assignedUserId: string | null
  assignedUser: User | null
  createdAt: string
  updatedAt: string
}

export interface Note {
  id: string
  leadId: string
  userId: string
  authorName: string
  authorAvatar: string
  authorRole: UserRole
  note: string
  createdAt: string
  updatedAt: string
}

export interface DashboardStats {
  totalLeads: number
  openLeads: number
  contactedLeads: number
  pendingLeads: number
  closedLeads: number
  ignoredLeads: number
  conversionRate: number
  leadsPerMonth: { label: string; leads: number; closed: number }[]
  recentLeads: Lead[]
  statusDistribution: { name: string; value: number; color: string }[]
  periodLabel: string
}

export interface ColumnFilter {
  id: string
  value: unknown
}

export interface ChatMessage {
  id: string
  conversationId: string
  senderId: string
  senderName: string
  senderAvatar: string
  content: string
  timestamp: string
}

export interface Conversation {
  id: string
  participants: { id: string; name: string; avatar: string; role: string }[]
  lastMessage: string
  lastMessageTime: string
  unread: number
  messages: ChatMessage[]
}
