"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var ConfigBox_exports = {};
__export(ConfigBox_exports, {
  ConfigBox: () => ConfigBox
});
module.exports = __toCommonJS(ConfigBox_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var import_ink = require("ink");
var import_StyledBox = require("./StyledBox.js");
function ConfigBox({ data }) {
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_StyledBox.StyledBox, { title: "Runtime Configuration", titleColor: "cyan", children: [
    data.configFilePath && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { children: [
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", children: "Agent config: " }),
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "blue", children: data.configFilePath })
    ] }),
    /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_StyledBox.StyledSection, { title: "LLM", children: [
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Provider", value: data.provider }),
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Model", value: data.model }),
      data.maxTokens !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Max Tokens", value: data.maxTokens.toString() }),
      data.temperature !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Temperature", value: data.temperature.toString() })
    ] }),
    /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledSection, { title: "Permissions", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Mode", value: data.permissionsMode }) }),
    /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_StyledBox.StyledSection, { title: "Sessions", children: [
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Max Sessions", value: data.maxSessions }),
      /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledRow, { label: "Session TTL", value: data.sessionTTL })
    ] }),
    /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledSection, { title: "MCP Servers", children: data.mcpServers.length > 0 ? data.mcpServers.map((server) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "cyan", children: server }) }, server)) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", children: "No MCP servers configured" }) }),
    data.promptsCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledSection, { title: "Prompts", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "gray", children: [
      data.promptsCount,
      " prompt(s) configured"
    ] }) }),
    data.hooksEnabled.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StyledBox.StyledSection, { title: "Hooks", children: data.hooksEnabled.map((hook) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "green", children: hook }) }, hook)) }),
    /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", italic: true, children: "Note: Some fields (logs, database paths) are auto-populated by the CLI." }) })
  ] });
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  ConfigBox
});
