"use client";
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { memo } from "react";
import { cn } from "@stigmer/theme";
import { formatDuration, formatMicroUsd, formatTokenCount, formatTimestamp } from "../format-utils.js";
export const SummaryTab = memo(function SummaryTab({ summary, className }) {
    const BZ = BigInt(0);
    return (_jsxs("dl", { className: cn("grid grid-cols-[auto_1fr] gap-x-3 gap-y-2 text-xs", className), children: [summary.startedAt && (_jsxs(_Fragment, { children: [_jsx("dt", { className: "text-muted-foreground", children: "Started" }), _jsx("dd", { className: "text-foreground", children: formatTimestamp(summary.startedAt) })] })), summary.completedAt && (_jsxs(_Fragment, { children: [_jsx("dt", { className: "text-muted-foreground", children: "Completed" }), _jsx("dd", { className: "text-foreground", children: formatTimestamp(summary.completedAt) })] })), summary.durationMs > 0 && (_jsxs(_Fragment, { children: [_jsx("dt", { className: "text-muted-foreground", children: "Duration" }), _jsx("dd", { className: "tabular-nums text-foreground", children: formatDuration(summary.durationMs) })] })), summary.costMicros > BZ && (_jsxs(_Fragment, { children: [_jsx("dt", { className: "text-muted-foreground", children: "Cost" }), _jsx("dd", { className: "tabular-nums text-foreground", children: formatMicroUsd(summary.costMicros) })] })), summary.totalTokens > BZ && (_jsxs(_Fragment, { children: [_jsx("dt", { className: "text-muted-foreground", children: "Tokens" }), _jsxs("dd", { className: "tabular-nums text-foreground", children: [formatTokenCount(summary.totalTokens), summary.inputTokens > BZ && summary.outputTokens > BZ && (_jsxs("span", { className: "ml-1 text-muted-foreground", children: ["(", formatTokenCount(summary.inputTokens), " in / ", formatTokenCount(summary.outputTokens), " out)"] }))] })] })), summary.attemptNumber > 1 && (_jsxs(_Fragment, { children: [_jsx("dt", { className: "text-muted-foreground", children: "Attempt" }), _jsx("dd", { className: "text-foreground", children: summary.attemptNumber })] }))] }));
});
//# sourceMappingURL=SummaryTab.js.map