import { formatVersionCombination } from './S7YAUZ26.js';
import { findToolByName, getToolDefaultVersion, getToolSupportedVersions } from './3XEUJAQB.js';
import { init_esm_shims, __name } from './CWKWODSW.js';

// src/display/version-display.ts
init_esm_shims();
function displayVersionCombinations(context) {
  console.log("\n\u{1F680} LayerZero VM Tool - Supported Version Combinations\n");
  const combinations = context.versionCombinations;
  const toolNames = [
    ...new Set(combinations.flatMap(({ images }) => Object.keys(images)))
  ].sort().join(", ");
  console.log(`\u{1F4E6} Tools: ${toolNames}`);
  console.log("\u2500".repeat(50));
  console.log("\u{1F3AF} Default:");
  console.log(formatVersionCombination(context, combinations[0], true));
  console.log();
  console.log("\u{1F4CB} All supported combinations:");
  for (const [index, combination] of combinations.entries()) {
    console.log(formatVersionCombination(context, combination, !index));
  }
  console.log();
  console.log("\u{1F4A1} Usage examples:");
  console.log("  lz-tool anchor --anchor-version 0.29.0 --solana-version 1.17.31 build");
  console.log("  lz-tool anchor --anchor-version 0.31.1 build  # Auto-selects compatible solana version");
  console.log();
}
__name(displayVersionCombinations, "displayVersionCombinations");
function displayToolVersionInfo(context, toolName) {
  const tool = findToolByName(context, toolName);
  const combinations = context.versionCombinations;
  if (!combinations) {
    throw new Error(`No version matrix found for tool: ${tool.name}`);
  }
  const defaultVersion = getToolDefaultVersion(context, tool.name);
  const supportedVersions = getToolSupportedVersions(context, tool.name);
  console.log(`
\u{1F527} ${tool.name.toUpperCase()} Version Information`);
  console.log("\u2500".repeat(40));
  console.log(`Default version: ${defaultVersion}`);
  console.log(`Supported versions: ${supportedVersions.join(", ")}`);
  console.log();
  if (tool.defaultVolumes && tool.defaultVolumes.length > 0) {
    console.log("\u{1F4E6} Default cache volumes:");
    tool.defaultVolumes.forEach((volume) => {
      const volumeDesc = volume.type === "isolate" ? `${volume.name} \u2192 ${volume.containerPath}` : `${volume.hostPath} \u2192 ${volume.containerPath}`;
      console.log(`  \u2022 ${volumeDesc}`);
    });
    console.log("  \u{1F4A1} Use -v to override or add additional volumes");
    console.log();
  }
  console.log("\u{1F517} Compatible combinations with other tools:");
  for (const [index, combination] of combinations.entries()) {
    if (combination.images[tool.name]) {
      console.log(formatVersionCombination(context, combination, !index));
    }
  }
  console.log();
  console.log("\u{1F4DD} Version resolution priority:");
  console.log("  1. Command line options (--{tool}-version)");
  console.log("  2. Default version");
  console.log();
}
__name(displayToolVersionInfo, "displayToolVersionInfo");

export { displayToolVersionInfo, displayVersionCombinations };
//# sourceMappingURL=QH3FM6DD.js.map
//# sourceMappingURL=QH3FM6DD.js.map