#!/usr/bin/env node
import {
  CLI_COLORS
} from "./chunk-FVN5PFFY.js";
import {
  init_esm_shims
} from "./chunk-DHET7RCE.js";

// src/cli/components/wizard/help-modal.tsx
init_esm_shims();
import { Box, Text } from "ink";
import { jsx, jsxs } from "react/jsx-runtime";
var GLOBAL_KEYS = {
  title: "Navigation",
  keys: [
    { key: "Arrow keys", description: "Move focus" },
    { key: "SPACE", description: "Toggle selection" },
    { key: "ENTER", description: "Confirm / continue" },
    { key: "ESC", description: "Go back" },
    { key: "TAB", description: "Jump to next section" }
  ]
};
var GLOBAL_TOGGLES = {
  title: "Global Toggles",
  keys: [
    { key: "E", description: "Toggle expert mode" },
    { key: "P", description: "Toggle plugin/local install mode" },
    { key: "?", description: "Toggle this help" }
  ]
};
var BUILD_KEYS = {
  title: "Build Step",
  keys: [
    { key: "D", description: "Toggle compatibility labels" },
    { key: "A", description: "Accept stack defaults (stack path only)" },
    { key: "h/j/k/l", description: "Vim-style navigation" }
  ]
};
var SOURCES_KEYS = {
  title: "Sources Step",
  keys: [{ key: "G", description: "Toggle source settings" }]
};
var AGENTS_KEYS = {
  title: "Agents Step",
  keys: []
};
var STEP_SECTIONS = {
  build: BUILD_KEYS,
  sources: SOURCES_KEYS,
  agents: AGENTS_KEYS
};
var KEY_COLUMN_WIDTH = 14;
var HelpSectionView = ({ section }) => /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [
  /* @__PURE__ */ jsx(Text, { bold: true, children: section.title }),
  section.keys.map(({ key, description }) => /* @__PURE__ */ jsxs(Box, { marginTop: 1, children: [
    /* @__PURE__ */ jsx(Box, { width: KEY_COLUMN_WIDTH, children: /* @__PURE__ */ jsxs(Text, { backgroundColor: "black", color: CLI_COLORS.UNFOCUSED, children: [
      " ",
      key,
      " "
    ] }) }),
    /* @__PURE__ */ jsx(Text, { children: description })
  ] }, key))
] });
var HelpModal = ({ currentStep }) => {
  const stepSection = STEP_SECTIONS[currentStep];
  return /* @__PURE__ */ jsxs(
    Box,
    {
      flexDirection: "column",
      borderStyle: "single",
      borderColor: CLI_COLORS.PRIMARY,
      paddingX: 2,
      paddingY: 1,
      marginTop: 1,
      children: [
        /* @__PURE__ */ jsx(Text, { bold: true, color: CLI_COLORS.PRIMARY, children: "Keyboard Shortcuts" }),
        /* @__PURE__ */ jsx(Text, { children: " " }),
        /* @__PURE__ */ jsx(HelpSectionView, { section: GLOBAL_KEYS }),
        /* @__PURE__ */ jsx(HelpSectionView, { section: GLOBAL_TOGGLES }),
        stepSection && /* @__PURE__ */ jsx(HelpSectionView, { section: stepSection }),
        /* @__PURE__ */ jsx(Text, { dimColor: true, children: "Press ESC or ? to close" })
      ]
    }
  );
};

export {
  HelpModal
};
//# sourceMappingURL=chunk-OALQWRLG.js.map