import {
  demo
} from "./chunk-JF6FAOTF.js";
import {
  base_command_default
} from "./chunk-LUHAPAT6.js";
import {
  readFile
} from "./chunk-LA4HX5WI.js";
import {
  cwd,
  resolvePath
} from "./chunk-T2GATXSP.js";
import {
  require_lib
} from "./chunk-CBD6UXLA.js";
import {
  __toESM,
  init_cjs_shims
} from "./chunk-POZ5MGPT.js";

// src/cli/commands/demo/index.ts
init_cjs_shims();
var import_core = __toESM(require_lib(), 1);
var Demo = class _Demo extends base_command_default {
  static {
    this.description = "Demo a command design defined in a file";
  }
  static {
    this.hidden = !0;
  }
  static {
    this.flags = {
      path: import_core.Flags.string({
        hidden: !1,
        description: "The directory where the demo file is located. Defaults to the current directory.",
        env: "SHOPIFY_FLAG_PATH",
        parse: async (input) => resolvePath(input),
        default: async () => cwd()
      }),
      file: import_core.Flags.string({
        hidden: !1,
        description: "The name of the demo file.",
        env: "SHOPIFY_FLAG_PATH",
        parse: async (input) => resolvePath(input),
        default: async () => cwd()
      })
    };
  }
  async run() {
    let { flags } = await this.parse(_Demo), contents = await readFile(flags.file), design = JSON.parse(contents);
    await demo(design);
  }
};

export {
  Demo
};
//# sourceMappingURL=chunk-7F3NYWEG.js.map
