/**
 * Voice Agent Staff Types - Stub
 * TODO: Define proper types when voice agent staff features are built
 */

export interface VoiceAgent {
  id: string;
  name: string;
  status: 'active' | 'inactive' | 'paused';
  model: string;
  voiceId: string;
  createdAt: Date;
  updatedAt: Date;
}

export interface VoiceAgentStats {
  totalAgents: number;
  activeAgents: number;
  totalConversations: number;
  averageDuration: number;
}

export interface VoiceConversation {
  id: string;
  agentId: string;
  customerPhone: string;
  customerName?: string;
  status: string;
  duration: number;
  transcript: VoiceTranscriptMessage[];
  createdAt: Date | string;
}

export interface VoiceTranscriptMessage {
  id?: string;
  role: 'agent' | 'customer' | 'system';
  sender?: string;
  content: string;
  timestamp: Date | string;
}

export interface StaffMember {
  id: string;
  name: string;
  email: string;
  role: string;
}

export interface VoiceAgentAction {
  id: string;
  conversationId: string;
  type: string;
  title?: string;
  status: VoiceActionStatus;
  description: string;
  assignedTo?: string;
  dueDate?: Date | string;
  dueAt?: Date | string;
  createdAt: Date | string;
  updatedAt: Date | string;
}

export interface VoiceAgentListFilters {
  status?: string;
  limit?: number;
  offset?: number;
}

export interface VoiceConversationListFilters {
  agentId?: string;
  status?: string;
  limit?: number;
  offset?: number;
}

// Additional type aliases used by components
export type VoiceActionType = 'CALL_BACK' | 'SEND_EMAIL' | 'BOOK_APPOINTMENT' | 'ESCALATE' | 'CUSTOM';
export type VoiceActionStatus = 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'DISMISSED' | 'CANCELLED';
export type VoiceAction = VoiceAgentAction;

export interface VoiceAgentSummary {
  id: string;
  name: string;
  agentId?: string;
  userName?: string;
  status: 'active' | 'inactive' | 'paused';
  conversationCount: number;
  lastActive?: Date | string;
  stats?: {
    totalConversations: number;
    totalCalls: number;
    avgDuration: number;
    avgSentiment: number;
    lastCallAt?: string;
  };
}

export interface VoiceAgentDashboardStats {
  totalAgents: number;
  activeAgents: number;
  totalConversations: number;
  conversationsToday?: number;
  averageDuration: number;
  avgDuration?: number;
  avgSentiment?: number;
  totalActions?: number;
  pendingActions?: number;
}

export interface VoiceConversationSummary {
  id: string;
  agentId: string;
  agentName?: string;
  customerPhone: string;
  customerName?: string;
  status: string;
  duration: number;
  sentiment?: number;
  actionsCount?: number;
  createdAt: Date | string;
}

export interface VoiceConversationDetail extends VoiceConversation {
  agentName?: string;
  sentiment?: number;
  summary?: string;
  actions?: VoiceAction[];
  metadata?: Record<string, unknown>;
}
