"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AgentCard = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("@chakra-ui/react");
const fi_1 = require("react-icons/fi");
const formatters_js_1 = require("../../utils/formatters.js");
const AgentCard = ({ agent }) => {
    const cardBg = (0, react_1.useColorModeValue)('gray.50', 'gray.700');
    const borderColor = (0, react_1.useColorModeValue)('gray.200', 'gray.600');
    return ((0, jsx_runtime_1.jsx)(react_1.Box, { p: 4, bg: cardBg, borderWidth: "1px", borderColor: borderColor, borderRadius: "md", _hover: { borderColor: 'blue.500' }, children: (0, jsx_runtime_1.jsxs)(react_1.VStack, { spacing: 3, align: "stretch", children: [(0, jsx_runtime_1.jsxs)(react_1.HStack, { justify: "space-between", children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontWeight: "bold", fontSize: "sm", children: agent.name }), (0, jsx_runtime_1.jsx)(react_1.Badge, { colorScheme: agent.status === 'running'
                                ? 'green'
                                : agent.status === 'paused'
                                    ? 'yellow'
                                    : agent.status === 'error'
                                        ? 'red'
                                        : 'gray', children: agent.status })] }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "xs", color: "gray.500", children: agent.type }), (0, jsx_runtime_1.jsx)(react_1.HStack, { spacing: 4, fontSize: "xs", children: (0, jsx_runtime_1.jsx)(react_1.Tooltip, { label: "Last Active", children: (0, jsx_runtime_1.jsxs)(react_1.HStack, { color: "gray.500", children: [(0, jsx_runtime_1.jsx)(react_1.Icon, { as: fi_1.FiClock }), (0, jsx_runtime_1.jsx)(react_1.Text, { children: (0, formatters_js_1.formatRelativeTime)(agent.updated) })] }) }) }), agent.capabilities && agent.capabilities.length > 0 && ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "xs", color: "gray.500", mb: 1, children: "Capabilities" }), (0, jsx_runtime_1.jsx)(react_1.HStack, { spacing: 2, wrap: "wrap", children: agent.capabilities.map((capability) => ((0, jsx_runtime_1.jsx)(react_1.Badge, { size: "sm", variant: "outline", colorScheme: "blue", children: capability }, capability))) })] })), agent.metadata && Object.keys(agent.metadata).length > 0 && ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "xs", color: "gray.500", mb: 1, children: "Metadata" }), (0, jsx_runtime_1.jsx)(react_1.VStack, { spacing: 1, align: "stretch", children: Object.entries(agent.metadata).map(([key, value]) => ((0, jsx_runtime_1.jsxs)(react_1.HStack, { fontSize: "xs", justify: "space-between", children: [(0, jsx_runtime_1.jsx)(react_1.Text, { color: "gray.500", children: key }), (0, jsx_runtime_1.jsx)(react_1.Text, { children: String(value) })] }, key))) })] }))] }) }));
};
exports.AgentCard = AgentCard;
exports.default = exports.AgentCard;
//# sourceMappingURL=AgentCard.js.map