import { Socket } from "socket.io-client";

export interface Message {
  id: string;
  text: string;
  isUser: boolean;
  timestamp: Date;
  streaming?: boolean;
  isSystem?: boolean;
  metadata?: {
    confidence?: number;
    type?: string;
    [key: string]: any;
  };
}

export interface SocketData {
  message?: {
    content: string;
    metadata?: {
      confidence?: number;
      [key: string]: any;
    };
  };
  session?: {
    id: string;
  };
  data?: string;
  type?: string;
  errorMessage?: string;
  [key: string]: any;
}

export interface SocketHandlersProps {
  socket: Socket | null;
  setStatus: (status: string) => void;
  setIsTyping: (isTyping: boolean) => void;
  setIsProcessing: (isProcessing: boolean) => void;
  addMessage: (message: MessageInput) => Message;
  addSystemMessage: (text: string, type: "success" | "error" | "info") => void;
  setCurrentSessionId: (id: string | null) => void;
  isProcessing?: boolean;
}

export interface MessageInput {
  text: string;
  isUser: boolean;
  metadata?: {
    confidence?: number;
  };
  streaming?: boolean;
}
