import { Fragment, jsx, jsxs } from "react/jsx-runtime";
import { Box, Text } from "ink";
import { useTerminalSize } from "../../hooks/useTerminalSize.js";
function Header({ modelName, sessionId, hasActiveSession, startupInfo }) {
  const { columns } = useTerminalSize();
  return /* @__PURE__ */ jsxs(
    Box,
    {
      borderStyle: "single",
      borderColor: "gray",
      paddingX: 1,
      flexDirection: "column",
      flexShrink: 0,
      width: columns,
      children: [
        /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: "greenBright", children: `\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557  \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557
\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557
\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557   \u255A\u2588\u2588\u2588\u2554\u255D    \u2588\u2588\u2551   \u2588\u2588\u2551   \u2588\u2588\u2551
\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D   \u2588\u2588\u2554\u2588\u2588\u2557    \u2588\u2588\u2551   \u2588\u2588\u2551   \u2588\u2588\u2551
\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2554\u255D \u2588\u2588\u2557   \u2588\u2588\u2551   \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D  \u255A\u2550\u255D   \u255A\u2550\u255D    \u255A\u2550\u2550\u2550\u2550\u2550\u255D` }) }),
        /* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "row", children: [
          /* @__PURE__ */ jsx(Text, { color: "gray", children: "Model: " }),
          /* @__PURE__ */ jsx(Text, { color: "white", children: modelName }),
          hasActiveSession && sessionId && /* @__PURE__ */ jsxs(Fragment, { children: [
            /* @__PURE__ */ jsx(Text, { color: "gray", children: " \u2022 Session: " }),
            /* @__PURE__ */ jsx(Text, { color: "white", children: sessionId.slice(0, 8) })
          ] })
        ] }),
        /* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
          /* @__PURE__ */ jsx(Text, { color: "gray", children: "Servers: " }),
          /* @__PURE__ */ jsx(Text, { color: "white", children: startupInfo.connectedServers.count }),
          /* @__PURE__ */ jsx(Text, { color: "gray", children: " \u2022 Tools: " }),
          /* @__PURE__ */ jsx(Text, { color: "white", children: startupInfo.toolCount })
        ] }),
        startupInfo.failedConnections.length > 0 && /* @__PURE__ */ jsx(Box, { flexDirection: "row", children: /* @__PURE__ */ jsxs(Text, { color: "yellowBright", children: [
          "\u26A0\uFE0F Failed: ",
          startupInfo.failedConnections.join(", ")
        ] }) }),
        startupInfo.updateInfo && /* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "row", children: [
          /* @__PURE__ */ jsxs(Text, { color: "yellow", children: [
            "\u2B06\uFE0F Update available: ",
            startupInfo.updateInfo.current,
            " \u2192",
            " ",
            startupInfo.updateInfo.latest
          ] }),
          /* @__PURE__ */ jsx(Text, { color: "gray", children: " \u2022 Run: " }),
          /* @__PURE__ */ jsx(Text, { color: "cyan", children: startupInfo.updateInfo.updateCommand })
        ] }),
        startupInfo.needsAgentSync && /* @__PURE__ */ jsxs(Box, { marginTop: startupInfo.updateInfo ? 0 : 1, flexDirection: "row", children: [
          /* @__PURE__ */ jsx(Text, { color: "yellow", children: "\u{1F504} Agent configs have updates available. Run: " }),
          /* @__PURE__ */ jsx(Text, { color: "cyan", children: "dexto sync-agents" })
        ] }),
        /* @__PURE__ */ jsx(Box, { marginBottom: 1, children: /* @__PURE__ */ jsx(Text, { children: " " }) })
      ]
    }
  );
}
export {
  Header
};
