import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { ExternalLink } from "lucide-react";
import { Button } from "../../../components/ui/button";
import { cn } from "../../../lib/utils";
import { getIndexStatus } from "./utils";
/**
 * Displays the indexed items count and status overview
 */
export function IndexStatusCards({ indexStatus, onGoToSettings, }) {
    const { statusLabel, statusClass, hasSettingsIssue } = getIndexStatus(indexStatus);
    return (_jsxs("div", { className: "flex w-full flex-wrap gap-2", children: [_jsxs("div", { className: "flex-1 rounded bg-gray-50 p-2", children: [_jsx("div", { className: "text-xs text-gray-600", children: "Indexed Items" }), _jsx("div", { className: "text-xl font-semibold", children: indexStatus.numberOfIndexedItems?.toLocaleString() ?? "0" })] }), _jsxs("div", { className: "flex-1 rounded bg-gray-50 p-2", children: [_jsx("div", { className: "text-xs text-gray-600", children: "Status" }), _jsx("div", { className: "space-y-1", children: _jsxs("div", { className: cn("flex flex-wrap items-center gap-1 text-sm font-medium", statusClass), children: [statusLabel, hasSettingsIssue && (_jsx(Button, { size: "sm", variant: "outline", onClick: onGoToSettings, title: "Go to Settings", children: _jsx(ExternalLink, { className: "h-3 w-3", strokeWidth: 1 }) }))] }) })] })] }));
}
//# sourceMappingURL=IndexStatusCards.js.map