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

// src/cli/components/wizard/step-refine.tsx
init_esm_shims();
import { Box, Text, useInput } from "ink";
import { jsx, jsxs } from "react/jsx-runtime";
var StepRefine = ({
  technologyCount,
  refineAction,
  onSelectAction,
  onContinue,
  onBack
}) => {
  useInput((_input, key) => {
    if (key.return) {
      onContinue();
    }
    if (key.escape) {
      onBack();
    }
    if (key.upArrow || key.downArrow) {
      onSelectAction(refineAction === "all-recommended" ? "customize" : "all-recommended");
    }
  });
  const isRecommendedSelected = refineAction === "all-recommended" || refineAction === null;
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, children: [
    /* @__PURE__ */ jsxs(Text, { children: [
      "Your stack includes",
      " ",
      /* @__PURE__ */ jsx(Text, { color: CLI_COLORS.PRIMARY, bold: true, children: technologyCount }),
      " ",
      "technologies."
    ] }),
    /* @__PURE__ */ jsx(Text, { children: " " }),
    /* @__PURE__ */ jsx(
      Box,
      {
        borderStyle: "round",
        borderColor: isRecommendedSelected ? CLI_COLORS.SUCCESS : CLI_COLORS.NEUTRAL,
        paddingX: 2,
        paddingY: 1,
        marginBottom: 1,
        children: /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
          /* @__PURE__ */ jsxs(
            Text,
            {
              color: isRecommendedSelected ? CLI_COLORS.SUCCESS : void 0,
              bold: isRecommendedSelected,
              children: [
                isRecommendedSelected ? ">" : "\u25CB",
                " Use all recommended skills (verified)",
                " ",
                /* @__PURE__ */ jsx(Text, { dimColor: true, children: isRecommendedSelected ? "(Selected)" : "(Not selected)" })
              ]
            }
          ),
          /* @__PURE__ */ jsx(Text, { children: " " }),
          /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
            "This is the fastest option. All skills are verified and maintained by",
            " ",
            DEFAULT_BRANDING.NAME
          ] })
        ] })
      }
    ),
    /* @__PURE__ */ jsx(
      Box,
      {
        borderStyle: "round",
        borderColor: !isRecommendedSelected ? CLI_COLORS.SUCCESS : CLI_COLORS.NEUTRAL,
        paddingX: 2,
        paddingY: 1,
        children: /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
          /* @__PURE__ */ jsxs(
            Text,
            {
              color: !isRecommendedSelected ? CLI_COLORS.SUCCESS : void 0,
              bold: !isRecommendedSelected,
              children: [
                !isRecommendedSelected ? ">" : "\u25CB",
                " Customize skill sources",
                " ",
                /* @__PURE__ */ jsx(Text, { dimColor: true, children: !isRecommendedSelected ? "(Selected)" : "(Not selected)" })
              ]
            }
          ),
          /* @__PURE__ */ jsx(Text, { children: " " }),
          /* @__PURE__ */ jsx(Text, { dimColor: true, children: "Choose alternative skills for each technology" })
        ] })
      }
    ),
    /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
      "\u2191",
      "/",
      "\u2193",
      " navigate ENTER continue ESC back"
    ] }) })
  ] });
};

export {
  StepRefine
};
//# sourceMappingURL=chunk-LJ5E4GXC.js.map