import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { formatDateTime } from "../../utils";
/**
 * Displays a list of latest embedded items
 */
export function LatestEmbeddingsList({ items }) {
    if (!items || items.length === 0) {
        return null;
    }
    return (_jsxs("div", { children: [_jsx("h3", { className: "mb-2 text-sm font-medium text-gray-700", children: "Latest Embeddings Generated" }), _jsx("div", { className: "max-h-72 space-y-1 overflow-y-auto", children: items.slice(0, 50).map((it) => (_jsx("div", { className: "flex items-center justify-between rounded bg-gray-50 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: "shrink-0 text-xs text-gray-500", children: formatDateTime(new Date(it.created)) }), it.path && (_jsx("div", { className: "mt-2 max-w-full text-xs wrap-anywhere text-gray-500", title: it.path, children: it.path }))] }) }, it.itemId + it.created))) })] }));
}
//# sourceMappingURL=LatestEmbeddingsList.js.map