import { Link } from "../../lib/navigation"; import { ChevronRightIcon, PanelsTopLeftIcon } from "lucide-react"; import { RailTrailingMetadata } from "./session-row-content"; import { cn } from "../../lib/utils"; import { visualTreeDepth } from "../../lib/session-rail"; import type { RailAggregateStatus } from "../../lib/sessions-group"; import type { SessionSiteOrigin } from "../../lib/session-site-origin"; /** A Site's row in the rail: open the Site view, or disclose its conversations. */ export function SiteSessionGroupHeading({ origin, workspaceId, expanded, onToggle, summary, count, relativeTime, depth = 0, active = false, }: { origin: SessionSiteOrigin; workspaceId: string; expanded: boolean; onToggle: () => void; summary: RailAggregateStatus; /** Conversations behind the row, loaded or not. */ count: number; relativeTime?: string | undefined; depth?: number | undefined; active?: boolean | undefined; }) { const conversations = `${count} ${count === 1 ? "conversation" : "conversations"}`; // A Site without conversations is a plain row: nothing to disclose. const disclosable = count > 0 || expanded; return (