#!/usr/bin/env node
import {
  useMeasuredHeight
} from "./chunk-K77I4XGL.js";
import {
  StackSelection
} from "./chunk-BMJZBLP7.js";
import {
  DomainSelection
} from "./chunk-TGLRDEEL.js";
import {
  ViewTitle
} from "./chunk-MGNYPVOJ.js";
import {
  useWizardStore
} from "./chunk-WF6RM73R.js";
import {
  init_esm_shims
} from "./chunk-DHET7RCE.js";

// src/cli/components/wizard/step-stack.tsx
init_esm_shims();
import { Box } from "ink";
import { jsx, jsxs } from "react/jsx-runtime";
var StepStack = ({ matrix, onCancel }) => {
  const { approach } = useWizardStore();
  const { ref: containerRef, measuredHeight } = useMeasuredHeight();
  if (approach !== null) {
    return /* @__PURE__ */ jsx(DomainSelection, { matrix });
  }
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", width: "100%", flexGrow: 1, flexBasis: 0, children: [
    /* @__PURE__ */ jsx(ViewTitle, { children: "Choose a stack" }),
    /* @__PURE__ */ jsx(Box, { ref: containerRef, flexGrow: 1, flexBasis: 0, children: /* @__PURE__ */ jsx(StackSelection, { matrix, availableHeight: measuredHeight, onCancel }) })
  ] });
};

export {
  StepStack
};
//# sourceMappingURL=chunk-MKCHLXMY.js.map