import a from '../chunks/index5.mjs';
import { i as inquirer } from '../chunks/index6.mjs';
import { g as getMcpServices, M as MCP_SERVICE_CONFIGS } from '../chunks/claude-config.mjs';
import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';

async function selectMcpServices() {
  ensureI18nInitialized();
  const mcpServices = await getMcpServices();
  const defaultSelectedIds = new Set(
    MCP_SERVICE_CONFIGS.filter((c) => c.defaultSelected).map((c) => c.id)
  );
  const choices = mcpServices.map((service) => ({
    name: `${service.name} - ${a.gray(service.description)}`,
    value: service.id,
    checked: defaultSelectedIds.has(service.id)
  }));
  const { services } = await inquirer.prompt({
    type: "checkbox",
    name: "services",
    message: `${i18n.t("mcp:selectMcpServices")}${i18n.t("common:multiSelectHint")}`,
    choices
  });
  if (services === void 0) {
    console.log(a.yellow(i18n.t("common:cancelled")));
    return void 0;
  }
  return services;
}

export { selectMcpServices as s };
