"use client";

import { ChatMessage } from "@/types";
import MessageItem from "./message-item";

interface MessageListProps {
  messages: ChatMessage[];
  selectedModel?: string;
}

export default function MessageList({ messages, selectedModel }: MessageListProps) {
  return (
    <div className="max-w-3xl mx-auto px-4">
      {messages.map((message) => (
        <MessageItem key={message.id} message={message} selectedModel={selectedModel} />
      ))}
    </div>
  );
}






