"use client"; import type { RecapTimelineSegment } from "@/lib/recap/types"; import { computeWidths, formatDuration, formatTime, normalizeTimelineSegments, TIMELINE_COLORS, } from "@/components/recap/timelineRender"; import { useI18n } from "@/lib/i18n/useI18n"; type Props = { rangeStart: string; rangeEnd: string; segments: RecapTimelineSegment[]; locale: string; muted?: boolean; hasData?: boolean; }; const MIN_SEGMENT_PCT = 1.5; export default function RecapMiniTimeline({ rangeStart, rangeEnd, segments, locale, muted = false, hasData = true, }: Props) { const { t } = useI18n(); const startMs = new Date(rangeStart).getTime(); const endMs = new Date(rangeEnd).getTime(); const totalMs = Math.max(1, endMs - startMs); const normalized = normalizeTimelineSegments(segments, startMs, endMs); const widths = computeWidths(normalized, totalMs, MIN_SEGMENT_PCT); if (!hasData) { return (