import {
  demo
} from "./chunk-JF6FAOTF.js";
import {
  base_command_default
} from "./chunk-LUHAPAT6.js";
import {
  outputInfo,
  readFile,
  renderAutocompletePrompt
} from "./chunk-LA4HX5WI.js";
import {
  joinPath
} from "./chunk-T2GATXSP.js";
import {
  init_cjs_shims
} from "./chunk-POZ5MGPT.js";

// src/cli/commands/demo/catalog.ts
init_cjs_shims();
import { fileURLToPath } from "url";
var Catalog = class extends base_command_default {
  static {
    this.description = "Browse the catalog for steps";
  }
  static {
    this.hidden = !0;
  }
  async run() {
    let catalogFile = joinPath(fileURLToPath(import.meta.url), "../../../../../assets/demo-catalog.json"), { steps } = JSON.parse(await readFile(catalogFile)), stepSelection = await renderAutocompletePrompt({
      message: "Step to display",
      choices: steps.map(({ title, type }) => ({
        label: title,
        value: title,
        group: type
      }))
    }), selectedStep = steps.find(({ title }) => title === stepSelection);
    outputInfo("The step looks like this:"), await demo({ steps: [selectedStep] }), outputInfo("JSON for this step:"), outputInfo(JSON.stringify(selectedStep, null, 2));
  }
};

export {
  Catalog
};
//# sourceMappingURL=chunk-H5IYM3L2.js.map
