import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Clock } from "lucide-react";
import { SettingsCard as Card } from "../SettingsCard";
import { formatDateTime } from "../../utils";
/**
 * Displays a list of latest embedded items
 */
export function LatestEmbeddingsList({ items }) {
    if (!items || items.length === 0) {
        return null;
    }
    return (_jsx(Card, { icon: _jsx(Clock, { strokeWidth: 1, className: "h-5 w-5" }), title: "Latest embeddings", description: "The most recently embedded items.", children: _jsx("div", { className: "max-h-72 space-y-1 overflow-y-auto", children: items.slice(0, 50).map((it) => (_jsx("div", { className: "bg-neutral-grey-5 flex items-center justify-between rounded p-2 text-sm", children: _jsxs("div", { className: "flex min-w-0 flex-1 flex-col items-baseline", children: [_jsx("span", { className: "truncate font-medium", children: it.name || it.itemId.slice(-8) }), _jsx("span", { className: "text-neutral-grey-50 shrink-0 text-xs", children: formatDateTime(new Date(it.created)) }), it.path && (_jsx("div", { className: "text-neutral-grey-50 mt-2 max-w-full text-xs wrap-anywhere", title: it.path, children: it.path }))] }) }, it.itemId + it.created))) }) }));
}
//# sourceMappingURL=LatestEmbeddingsList.js.map