import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Database, Settings } from "lucide-react";
import { Card } from "../../../components/ui/card";
import { DeleteIcon } from "../../../components/ui/delete-icon";
import { cn } from "../../../lib/utils";
/**
 * Advanced settings section with centroids and maintenance options
 */
export function AdvancedSettings({ kCentroids, onKCentroidsChange, onPopulateCentroids, isPopulating, centroidsStatus, onCleanup, isCleaning, }) {
    return (_jsx(Card, { icon: _jsx(Settings, { strokeWidth: 1, className: "h-5 w-5" }), title: "Advanced", description: "Centroid tuning and index maintenance.", collapsible: "yes", defaultCollapsed: "yes", children: _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "border-border-default bg-neutral-grey-5 rounded-lg border p-3", children: [_jsx("h4", { className: "text-neutral-grey-100 mb-1 text-xs font-medium", children: "Centroids configuration" }), _jsx("p", { className: "text-neutral-grey-50 mb-2 text-xs", children: "Centroids improve search performance by clustering embeddings." }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("label", { htmlFor: "kCentroids", className: "text-neutral-grey-50 text-xs", children: "K:" }), _jsx("input", { id: "kCentroids", type: "number", min: 1, value: kCentroids, onChange: (e) => onKCentroidsChange(parseInt(e.target.value) || 1024), className: "border-border-default badge-pad focus:border-highlight-100 focus:ring-highlight-100 w-20 rounded border text-xs focus:ring-1 focus:outline-none" })] }), _jsxs("button", { onClick: onPopulateCentroids, disabled: centroidsStatus?.isPopulating || isPopulating, title: "Populate Centroids", className: cn("badge-pad flex items-center gap-1 rounded text-xs font-medium transition-colors", {
                                        "bg-highlight-100 hover:bg-highlight-100 cursor-pointer text-white": !centroidsStatus?.isPopulating && !isPopulating,
                                        "bg-neutral-grey-10 text-neutral-grey-50 cursor-not-allowed": centroidsStatus?.isPopulating || isPopulating,
                                    }), children: [_jsx(Database, { className: "h-3 w-3", strokeWidth: 1 }), centroidsStatus?.isPopulating || isPopulating
                                            ? "..."
                                            : "Populate"] })] })] }), _jsxs("div", { className: "border-border-default bg-neutral-grey-5 rounded-lg border p-3", children: [_jsx("h4", { className: "text-neutral-grey-100 mb-1 text-xs font-medium", children: "Maintenance" }), _jsx("p", { className: "text-neutral-grey-50 mb-2 text-xs", children: "Clean up completed batch files from storage." }), _jsxs("button", { onClick: onCleanup, disabled: isCleaning, className: cn("badge-pad flex items-center gap-1 rounded text-xs font-medium transition-colors", {
                                "bg-neutral-grey-10 text-neutral-grey-100 hover:bg-neutral-grey-10 cursor-pointer": !isCleaning,
                                "bg-neutral-grey-10 text-neutral-grey-50 cursor-not-allowed": isCleaning,
                            }), children: [_jsx(DeleteIcon, { size: "sm" }), isCleaning ? "Cleaning..." : "Cleanup"] })] })] }) }));
}
//# sourceMappingURL=AdvancedSettings.js.map