import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
import { Byline } from "../design/Byline.js";
export function CapabilitiesSection(props) {
    const model = mcpCapabilitiesModel({
        tools: props.serverToolsCount,
        prompts: props.serverPromptsCount,
        resources: props.serverResourcesCount,
    });
    return (_jsxs(Box, { children: [_jsx(Text, { bold: true, children: "Capabilities: " }), model.labels.length > 0 ? (_jsx(Byline, { children: model.labels.map((label) => label.label) })) : (_jsx(Text, { color: "gray", children: "none" }))] }));
}
export function mcpCapabilitiesModel(input) {
    const labels = [];
    if ((input.tools ?? 0) > 0)
        labels.push({ label: "tools", tone: "brand" });
    if ((input.resources ?? 0) > 0)
        labels.push({ label: "resources", tone: "success" });
    if ((input.prompts ?? 0) > 0)
        labels.push({ label: "prompts", tone: "warning" });
    return {
        labels,
        summary: labels.length > 0 ? labels.map((label) => label.label).join(", ") : "none",
    };
}
