import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  messages_default
} from "./chunk-GL7CIIX2.js";
import {
  Option,
  createCommand
} from "./chunk-4CMTZJ25.js";
import {
  createI18n
} from "./chunk-CIOBCAOI.js";
import "./chunk-RPTAJN5Y.js";
import "./chunk-2DKXIL7C.js";
import {
  require_react
} from "./chunk-7ZOEVDW3.js";
import "./chunk-AFPDHQYI.js";
import "./chunk-DR2IE2NL.js";
import "./chunk-YRSNPU5L.js";
import "./chunk-PIOT47FJ.js";
import {
  __toESM,
  init_esm_shims
} from "./chunk-EXLZF52D.js";

// ../cli-site/src/index.ts
init_esm_shims();

// ../cli-site/src/commands/root-command.ts
init_esm_shims();

// ../cli-site/src/commands/dev.tsx
init_esm_shims();
var import_react = __toESM(require_react(), 1);

// ../cli-site/src/i18n.ts
init_esm_shims();
function createI18nT() {
  const i18n = createI18n(messages_default);
  return i18n.t.bind(i18n);
}

// ../cli-site/src/commands/dev.tsx
var devCommand = (services, cliVersion) => {
  const t = createI18nT();
  return createCommand("dev").description(t("site_dev_command_def.description")).option("--tunnel", t("site_dev_command_def.option.tunnel")).action(async (options, command) => {
    const { tunnel = false } = options;
    const { renderCommand } = await import("./render-command-5343MO3I.js");
    const { DevCommand } = await import("./DevCommand-KZ6TP7Z2.js");
    await renderCommand(
      command,
      services,
      cliVersion,
      /* @__PURE__ */ import_react.default.createElement(DevCommand, { useTunnel: tunnel })
    );
  });
};

// ../cli-site/src/commands/preview.tsx
init_esm_shims();
var import_react2 = __toESM(require_react(), 1);
var previewCommand = (services, cliVersion) => {
  const t = createI18nT();
  return createCommand("preview").description(t("site_preview_command_def.description")).option("-f, --force", t("site_preview_command_def.option.force")).action(async (options, command) => {
    const { force = false } = options;
    const { renderCommand } = await import("./render-command-5343MO3I.js");
    const { PreviewCommand } = await import("./PreviewCommand-Q67HDEB3.js");
    await renderCommand(
      command,
      services,
      cliVersion,
      /* @__PURE__ */ import_react2.default.createElement(PreviewCommand, { force })
    );
  });
};

// ../cli-site/src/commands/publish.tsx
init_esm_shims();
var import_react3 = __toESM(require_react(), 1);
var publishCommand = (services, cliVersion) => {
  const t = createI18nT();
  return createCommand("publish").description(t("site_publish_command_def.description")).addOption(
    new Option(
      "-y, --approve-preview",
      t("site_publish_command_def.option.approve_preview")
    ).conflicts("force")
  ).option("-f, --force", t("site_publish_command_def.option.force")).action(async (options, command) => {
    const { approvePreview = false, force = false } = options;
    const { renderCommand } = await import("./render-command-5343MO3I.js");
    const { PublishCommand } = await import("./PublishCommand-EUMOWDMN.js");
    await renderCommand(
      command,
      services,
      cliVersion,
      /* @__PURE__ */ import_react3.default.createElement(PublishCommand, { approvePreview, force })
    );
  });
};

// ../cli-site/src/commands/install.tsx
init_esm_shims();
var import_react4 = __toESM(require_react(), 1);
var installCommand = (services, cliVersion) => {
  const t = createI18nT();
  return createCommand("install").description(t("site_install_command_def.description")).argument("[package]", t("site_install_command_def.argument.package")).action(async (packageName, _opts, command) => {
    const { renderCommand } = await import("./render-command-5343MO3I.js");
    const { InstallCommand } = await import("./InstallCommand-Y3PSBQXV.js");
    await renderCommand(
      command,
      services,
      cliVersion,
      /* @__PURE__ */ import_react4.default.createElement(InstallCommand, { packageName })
    );
  });
};

// ../cli-site/src/commands/uninstall.tsx
init_esm_shims();
var import_react5 = __toESM(require_react(), 1);
var uninstallCommand = (services, cliVersion) => {
  const t = createI18nT();
  return createCommand("uninstall").description(t("site_uninstall_command_def.description")).argument("<package>", t("site_uninstall_command_def.argument.package")).action(async (packageName, _opts, command) => {
    const { renderCommand } = await import("./render-command-5343MO3I.js");
    const { UninstallCommand } = await import("./UninstallCommand-4UEFMKGE.js");
    await renderCommand(
      command,
      services,
      cliVersion,
      /* @__PURE__ */ import_react5.default.createElement(UninstallCommand, { packageName })
    );
  });
};

// ../cli-site/src/commands/root-command.ts
var getRootCommand = async function getRootCommand2(services, cliVersion) {
  return createCommand("site").addCommand(devCommand(services, cliVersion)).addCommand(previewCommand(services, cliVersion)).addCommand(publishCommand(services, cliVersion)).addCommand(installCommand(services, cliVersion)).addCommand(uninstallCommand(services, cliVersion));
};
export {
  getRootCommand
};
//# sourceMappingURL=src-23YBI7FY.js.map