import Link from "@moduletrace/twui/layout/Link";
import Span from "@moduletrace/twui/layout/Span";
import Stack from "@moduletrace/twui/layout/Stack";
import { twMerge } from "tailwind-merge";
import ChatroomStone from "@/src/components/general/chatroom-stone";
import type { ChatroomSummary } from "@/src/types";
import chatroomStatusLine from "@/src/utils/chatroom-status-line";
type Props = {
chatroom: ChatroomSummary;
href: string;
selected?: boolean;
};
/**
* A chatroom in the rail, the same 48px row as a bot: the asking bot's
* stone, the request and where it stands. Unread is said in words.
*/
export default function RailChatroomRow({ chatroom, href, selected }: Props) {
const requester = chatroom.bots[0];
return (
{requester ? : null}
{chatroom.title || "A request"}
{chatroom.unread ? "New messages" : chatroomStatusLine(chatroom)}
);
}