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-MDUBZZTI.js";
import "./chunk-RPTAJN5Y.js";
import "./chunk-QK47PIWK.js";
import {
  require_react
} from "./chunk-TODKQSCF.js";
import "./chunk-AFPDHQYI.js";
import "./chunk-XZUGLEBK.js";
import "./chunk-SDLCFZRL.js";
import "./chunk-WGV2XQSB.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-725GZ6HF.js");
    const { DevCommand } = await import("./DevCommand-LKJIR3UC.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-725GZ6HF.js");
    const { PreviewCommand } = await import("./PreviewCommand-UBBOCKA6.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-725GZ6HF.js");
    const { PublishCommand } = await import("./PublishCommand-JDOKAYBC.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-725GZ6HF.js");
    const { InstallCommand } = await import("./InstallCommand-JWKI54GZ.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-725GZ6HF.js");
    const { UninstallCommand } = await import("./UninstallCommand-AMC7XEUQ.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-PV5O247T.js.map