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

// src/cli/components/wizard/wizard-tabs.tsx
init_esm_shims();
import { Box, Text } from "ink";
import { jsx, jsxs } from "react/jsx-runtime";
var WIZARD_STEPS = [
  { id: "stack", label: "Stack", number: 1 },
  { id: "build", label: "Build", number: 2 },
  { id: "sources", label: "Sources", number: 3 },
  { id: "agents", label: "Agents", number: 4 },
  { id: "confirm", label: "Confirm", number: 5 }
];
function formatStepLabel(stepId) {
  const step = WIZARD_STEPS.find((s) => s.id === stepId);
  if (!step) return { prefix: "", label: stepId, full: stepId };
  const prefix = `[${step.number}]`;
  return { prefix, label: step.label, full: `${prefix} ${step.label}` };
}
var getStepState = (stepId, currentStep, completedSteps, skippedSteps) => {
  if (completedSteps.includes(stepId)) return "completed";
  if (stepId === currentStep) return "current";
  if (skippedSteps.includes(stepId)) return "skipped";
  return "pending";
};
var Tab = ({ step, state }) => {
  const label = `[${step.number}] ${step.label}`;
  switch (state) {
    case "current":
      return /* @__PURE__ */ jsxs(Text, { color: CLI_COLORS.UNFOCUSED, backgroundColor: CLI_COLORS.WARNING, bold: true, children: [
        " ",
        label,
        " "
      ] });
    case "completed":
      return /* @__PURE__ */ jsx(Text, { children: label });
    case "skipped":
      return /* @__PURE__ */ jsx(Text, { dimColor: true, children: label });
    case "pending":
    default:
      return /* @__PURE__ */ jsx(Text, { color: CLI_COLORS.UNFOCUSED, children: label });
  }
};
var WizardTabs = ({
  steps,
  currentStep,
  completedSteps,
  skippedSteps = [],
  version
}) => {
  return /* @__PURE__ */ jsxs(
    Box,
    {
      flexDirection: "row",
      columnGap: 2,
      borderRight: false,
      borderLeft: false,
      borderColor: "blackBright",
      borderStyle: "single",
      paddingRight: 1,
      alignItems: "center",
      children: [
        steps.map((step) => {
          const state = getStepState(step.id, currentStep, completedSteps, skippedSteps);
          return /* @__PURE__ */ jsx(Tab, { step, state }, step.id);
        }),
        /* @__PURE__ */ jsx(Box, { flexGrow: 1, justifyContent: "flex-end", children: /* @__PURE__ */ jsx(Text, { dimColor: true, children: `v${version}` }) })
      ]
    }
  );
};

export {
  WIZARD_STEPS,
  formatStepLabel,
  WizardTabs
};
//# sourceMappingURL=chunk-MVEYK55V.js.map