import { X } from "lucide-react";
import { Button, DynText } from "../../ui/primitives";
import type { MessageRecord } from "../../store";
import { t } from "../../i18n";
import { formatRelative } from "../../utils/format";
import s from "./MessageList.module.css";
export interface MessageListProps
{
messages: MessageRecord[];
onDismiss: (id: string) => void;
onClearAll: () => void;
}
export function MessageList(props: MessageListProps)
{
const { messages, onDismiss, onClearAll } = props;
if (messages.length === 0) { return null; }
return (