import type { CallRecord } from "@/lib/types"; interface Props { call: CallRecord; systemName?: string; } function duration(started: string, ended: string | null): string { if (!ended) return "active"; const ms = new Date(ended).getTime() - new Date(started).getTime(); const s = Math.floor(ms / 1000); return s < 60 ? `${s}s` : `${Math.floor(s / 60)}m ${s % 60}s`; } export function CallRow({ call, systemName }: Props) { const isActive = call.status === "active"; return (