import { jsx, jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
import { StyledBox, StyledSection, StyledRow } from "./StyledBox.js";
function ConfigBox({ data }) {
  return /* @__PURE__ */ jsxs(StyledBox, { title: "Runtime Configuration", titleColor: "cyan", children: [
    data.configFilePath && /* @__PURE__ */ jsxs(Box, { children: [
      /* @__PURE__ */ jsx(Text, { color: "gray", children: "Agent config: " }),
      /* @__PURE__ */ jsx(Text, { color: "blue", children: data.configFilePath })
    ] }),
    /* @__PURE__ */ jsxs(StyledSection, { title: "LLM", children: [
      /* @__PURE__ */ jsx(StyledRow, { label: "Provider", value: data.provider }),
      /* @__PURE__ */ jsx(StyledRow, { label: "Model", value: data.model }),
      data.maxTokens !== null && /* @__PURE__ */ jsx(StyledRow, { label: "Max Tokens", value: data.maxTokens.toString() }),
      data.temperature !== null && /* @__PURE__ */ jsx(StyledRow, { label: "Temperature", value: data.temperature.toString() })
    ] }),
    /* @__PURE__ */ jsx(StyledSection, { title: "Permissions", children: /* @__PURE__ */ jsx(StyledRow, { label: "Mode", value: data.permissionsMode }) }),
    /* @__PURE__ */ jsxs(StyledSection, { title: "Sessions", children: [
      /* @__PURE__ */ jsx(StyledRow, { label: "Max Sessions", value: data.maxSessions }),
      /* @__PURE__ */ jsx(StyledRow, { label: "Session TTL", value: data.sessionTTL })
    ] }),
    /* @__PURE__ */ jsx(StyledSection, { title: "MCP Servers", children: data.mcpServers.length > 0 ? data.mcpServers.map((server) => /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { color: "cyan", children: server }) }, server)) : /* @__PURE__ */ jsx(Text, { color: "gray", children: "No MCP servers configured" }) }),
    data.promptsCount > 0 && /* @__PURE__ */ jsx(StyledSection, { title: "Prompts", children: /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
      data.promptsCount,
      " prompt(s) configured"
    ] }) }),
    data.hooksEnabled.length > 0 && /* @__PURE__ */ jsx(StyledSection, { title: "Hooks", children: data.hooksEnabled.map((hook) => /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text, { color: "green", children: hook }) }, hook)) }),
    /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: "gray", italic: true, children: "Note: Some fields (logs, database paths) are auto-populated by the CLI." }) })
  ] });
}
export {
  ConfigBox
};
