import { displayBannerWithInfo } from './banner.mjs';
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BtrioX1Z.mjs';
import { s as showCcrMenu, a as showMainMenu } from './index9.mjs';
import './index5.mjs';
import '../shared/ccjk.BAGoDD49.mjs';
import './index2.mjs';
import 'node:fs';
import 'node:process';
import 'node:url';
import '../shared/ccjk.bQ7Dh1g4.mjs';
import '../shared/ccjk.gDEDGD_t.mjs';
import './index6.mjs';
import 'node:readline';
import 'stream';
import 'node:tty';
import 'node:async_hooks';
import '../shared/ccjk.Cjgrln_h.mjs';
import 'node:util';
import 'tty';
import 'fs';
import 'child_process';
import 'node:path';
import 'node:os';
import 'node:crypto';
import 'buffer';
import 'string_decoder';
import './constants.mjs';
import './ccjk-config.mjs';
import '../shared/ccjk.BBtCGd_g.mjs';
import './index3.mjs';
import './fs-operations.mjs';
import 'node:fs/promises';
import './json-config.mjs';
import '../shared/ccjk.RyizuzOI.mjs';
import './clavue-config.mjs';
import '../shared/ccjk.DDL-4C-k.mjs';
import './config.mjs';
import './claude-config.mjs';
import 'node:child_process';
import './platform.mjs';
import './main.mjs';
import 'module';
import 'node:stream';
import './codex.mjs';
import './index8.mjs';
import '../shared/ccjk.DeWpAShp.mjs';
import '../shared/ccjk.CxpGa6MC.mjs';
import '../shared/ccjk.BFQ7yr5S.mjs';
import './prompts.mjs';
import '../shared/ccjk.DZ2LLOa-.mjs';
import './code-type-resolver.mjs';
import './features.mjs';
import '../shared/ccjk.L7yC58_i.mjs';
import '../shared/ccjk.C0WLUnFV.mjs';
import '../shared/ccjk.DhJ1kyDR.mjs';
import './simple-config.mjs';
import '../shared/ccjk.DbigonEQ.mjs';
import 'node:stream/promises';
import 'tar';
import './smart-guide.mjs';
import './ccu.mjs';
import './init.mjs';
import './config2.mjs';
import '../shared/ccjk.DFRPtmK_.mjs';
import './auto-updater.mjs';
import './version-checker.mjs';
import '../shared/ccjk.BXv8aYs1.mjs';
import './installer.mjs';
import '../shared/ccjk.BLsIiTqO.mjs';
import '../shared/ccjk.B2U7DsPy.mjs';
import '../shared/ccjk.Bq8TqZG_.mjs';
import './commands.mjs';
import './check-updates.mjs';
import './config-switch.mjs';
import './doctor.mjs';
import './api-providers.mjs';
import '../shared/ccjk.DsZsc4LR.mjs';
import '../shared/ccjk.5bEolFrk.mjs';
import '../shared/ccjk.J8YiPsOw.mjs';
import '../shared/ccjk.D-magaEx.mjs';
import '../shared/ccjk.CwGZSTAK.mjs';
import './notification.mjs';
import '../shared/ccjk.DcMvE7lf.mjs';
import '../shared/ccjk.D0g2ABGg.mjs';
import '../shared/ccjk.D6ycHbak.mjs';
import 'node:buffer';
import './uninstall.mjs';
import '../shared/ccjk.D75wivnp.mjs';
import 'globby';
import './update.mjs';
import '../shared/ccjk.lG3ccFjm.mjs';

async function ccr(options = {}) {
  try {
    if (!options.skipBanner) {
      displayBannerWithInfo();
    }
    const continueInCcr = await showCcrMenu();
    if (!continueInCcr && !options.skipBanner) {
      await showMainMenu();
    }
  } catch (error) {
    if (!handleExitPromptError(error)) {
      handleGeneralError(error);
    }
  }
}

export { ccr };
