import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { ViewTabs } from './ViewTabs';
import { McpServer } from './McpServer';
import { useMcpServers } from '../contexts/McpContext';
import { useTheme } from '../theme';
export const McpToolsView = ({ activeView, onSelectView, onOpenSettings }) => {
    const { servers, removeServer } = useMcpServers();
    const theme = useTheme();
    return (_jsxs("div", { className: theme.mcpToolsView.container, children: [_jsx("div", { className: theme.mcpToolsView.header, children: _jsxs("div", { className: theme.mcpToolsView.headerInner, children: [_jsx(ViewTabs, { activeView: activeView, onSelectView: onSelectView }), onOpenSettings && (_jsx("button", { type: 'button', onClick: onOpenSettings, className: theme.mcpToolsView.settingsButton, children: "Settings" }))] }) }), _jsx("div", { className: theme.mcpToolsView.body, children: _jsxs("div", { className: theme.mcpToolsView.serverList, children: [servers.map(({ id }) => (_jsx("div", { className: theme.mcpToolsView.serverCard, children: _jsx(McpServer, { uniqueId: id, onDelete: removeServer, showStats: false, showTools: true, showPrompts: false }) }, id))), servers.length === 0 && (_jsxs("div", { className: theme.mcpToolsView.serverEmptyState, children: ["No MCP servers configured yet. Open ", _jsx("span", { className: 'font-medium text-gray-700', children: "Settings" }), " to connect a server before testing tools here."] }))] }) })] }));
};
export default McpToolsView;
