import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Database, Trash2, Settings, ChevronDown } from "lucide-react";
import { cn } from "../../../lib/utils";
/**
 * Advanced settings section with centroids and maintenance options
 */
export function AdvancedSettings({ showAdvanced, onToggle, kCentroids, onKCentroidsChange, onPopulateCentroids, isPopulating, centroidsStatus, onCleanup, isCleaning, }) {
    return (_jsxs("div", { className: "border-t border-gray-200 pt-4", children: [_jsxs("button", { onClick: onToggle, className: "flex w-full cursor-pointer items-center justify-between text-sm text-gray-600 hover:text-gray-900", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Settings, { className: "h-4 w-4", strokeWidth: 1 }), _jsx("span", { className: "font-medium", children: "Advanced Settings" })] }), _jsx(ChevronDown, { className: cn("h-4 w-4 transition-transform duration-200", showAdvanced ? "rotate-180" : ""), strokeWidth: 1 })] }), _jsx("div", { className: cn("grid overflow-hidden transition-[grid-template-rows] duration-200", showAdvanced ? "grid-rows-[1fr]" : "grid-rows-[0fr]"), children: _jsx("div", { className: "min-h-0 overflow-hidden", children: _jsxs("div", { className: "mt-3 space-y-3", children: [_jsxs("div", { className: "rounded-lg border border-gray-200 bg-gray-50 p-3", children: [_jsx("h4", { className: "mb-1 text-xs font-medium text-gray-700", children: "Centroids Configuration" }), _jsx("p", { className: "mb-2 text-xs text-gray-500", 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-xs text-gray-600", children: "K:" }), _jsx("input", { id: "kCentroids", type: "number", min: 1, value: kCentroids, onChange: (e) => onKCentroidsChange(parseInt(e.target.value) || 1024), className: "w-20 rounded border border-gray-300 px-2 py-1 text-xs focus:border-purple-500 focus:ring-1 focus:ring-purple-500 focus:outline-none" })] }), _jsxs("button", { onClick: onPopulateCentroids, disabled: centroidsStatus?.isPopulating || isPopulating, title: "Populate Centroids", className: cn("flex items-center gap-1 rounded px-2 py-1 text-xs font-medium transition-colors", {
                                                    "cursor-pointer bg-purple-500 text-white hover:bg-purple-600": !centroidsStatus?.isPopulating && !isPopulating,
                                                    "cursor-not-allowed bg-gray-300 text-gray-500": centroidsStatus?.isPopulating || isPopulating,
                                                }), children: [_jsx(Database, { className: "h-3 w-3", strokeWidth: 1 }), centroidsStatus?.isPopulating || isPopulating
                                                        ? "..."
                                                        : "Populate"] })] })] }), _jsxs("div", { className: "rounded-lg border border-gray-200 bg-gray-50 p-3", children: [_jsx("h4", { className: "mb-1 text-xs font-medium text-gray-700", children: "Maintenance" }), _jsx("p", { className: "mb-2 text-xs text-gray-500", children: "Clean up completed batch files from storage." }), _jsxs("button", { onClick: onCleanup, disabled: isCleaning, className: cn("flex items-center gap-1 rounded px-2 py-1 text-xs font-medium transition-colors", {
                                            "cursor-pointer bg-gray-200 text-gray-700 hover:bg-gray-300": !isCleaning,
                                            "cursor-not-allowed bg-gray-300 text-gray-500": isCleaning,
                                        }), children: [_jsx(Trash2, { className: "h-3 w-3", strokeWidth: 1 }), isCleaning ? "Cleaning..." : "Cleanup"] })] })] }) }) })] }));
}
//# sourceMappingURL=AdvancedSettings.js.map