2026-07-29 19:36:32 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
import { cn } from '@/lib/utils';
|
|
|
|
|
import type { CollapsedActivityState } from './collapsedActivityState';
|
|
|
|
|
|
|
|
|
|
export function CollapsedActivityIndicator({
|
|
|
|
|
state,
|
|
|
|
|
activeLabel,
|
|
|
|
|
unreadLabel,
|
|
|
|
|
className,
|
|
|
|
|
}: {
|
|
|
|
|
state: Exclude<CollapsedActivityState, null>;
|
|
|
|
|
activeLabel: string;
|
|
|
|
|
unreadLabel: string;
|
|
|
|
|
className?: string;
|
|
|
|
|
}): React.ReactNode {
|
|
|
|
|
const label = state === 'active' ? activeLabel : unreadLabel;
|
2026-08-05 03:06:35 +03:00
|
|
|
// Aggregate rows carry the dot only; the elapsed counter is per session and
|
|
|
|
|
// has no meaning for a collapsed group that may hold several running turns.
|
2026-07-29 19:36:32 +02:00
|
|
|
return (
|
|
|
|
|
<span
|
|
|
|
|
className={cn(
|
|
|
|
|
'h-1.5 w-1.5 shrink-0 rounded-full',
|
2026-08-05 03:06:35 +03:00
|
|
|
state === 'active' ? 'bg-primary' : 'bg-[var(--status-info)]',
|
2026-07-29 19:36:32 +02:00
|
|
|
className,
|
|
|
|
|
)}
|
|
|
|
|
aria-label={label}
|
|
|
|
|
title={label}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
}
|