import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import ServerTitleWithStatus from './ServerTitleWithStatus';
import { useTheme } from '../theme/ThemeContext';
import { formatConnectionTarget, formatTransportLabel } from '../lib/mcpConnection';
const ServerCheckingView = ({ options, onDelete }) => {
    const theme = useTheme();
    const target = formatConnectionTarget(options);
    const transport = formatTransportLabel(options.transportMode);
    const subtitle = `${transport} · ${target}`;
    const statusText = options.transportMode === 'stdio'
        ? `Starting ${target}...`
        : `Testing connection to ${target}...`;
    return (_jsxs("div", { className: theme.serverChecking.container, children: [_jsx(ServerTitleWithStatus, { title: options.serverName, subtitle: subtitle, status: { label: 'Checking', tone: 'info' }, onDelete: onDelete }), _jsxs("div", { className: theme.serverChecking.statusCard, children: [_jsx("div", { className: theme.serverChecking.spinner }), _jsx("span", { className: theme.serverChecking.statusText, children: statusText })] })] }));
};
export default ServerCheckingView;
