import React from 'react'; import { Badge, Button } from "../common/index"; export default function ConfigCard({ config, onAdd, isStaged, disabled }) { const chunkParamEntries = Object.entries(config.chunk_params || {}).slice(0, 3); const status = config.indexingStatus || "idle"; const statusLabel = status === "indexing" ? "Indexing..." : status === "ready" ? "Ready ✅" : status === "already_exists" ? "Already indexed ✅" : status === "error" ? "Index failed" : "Not indexed"; const statusColor = status === "indexing" ? "orange" : status === "ready" || status === "already_exists" ? "green" : status === "error" ? "red" : "gray"; const canAdd = !disabled && !isStaged && status !== "indexing"; return (
{config.isPreset ? "Preset configuration" : "Custom configuration"}