'use strict';

var FLI6L2YX_cjs = require('./FLI6L2YX.cjs');
var DWHHPWIY_cjs = require('./DWHHPWIY.cjs');
var EDZNH6J4_cjs = require('./EDZNH6J4.cjs');
var VO65XOWD_cjs = require('./VO65XOWD.cjs');

// src/display/version-display.ts
VO65XOWD_cjs.init_cjs_shims();
function displayVersionCombinations() {
  console.log("\n\u{1F680} LayerZero VM Tool - Supported Version Combinations\n");
  for (const matrix of EDZNH6J4_cjs.versionMatrices) {
    const typeTools = DWHHPWIY_cjs.findToolsByType(matrix.toolType);
    if (typeTools.length === 0) continue;
    const toolNames = typeTools.map((tool) => tool.name).join(", ");
    console.log(`\u{1F4E6} ${matrix.toolType.toUpperCase()} Type (tools: ${toolNames})`);
    console.log("\u2500".repeat(50));
    const defaultCombination = DWHHPWIY_cjs.findDefaultCombination(matrix);
    console.log("\u{1F3AF} Default:");
    console.log(FLI6L2YX_cjs.formatVersionCombination(defaultCombination, true));
    console.log();
    console.log("\u{1F4CB} All supported combinations:");
    matrix.combinations.forEach((combo) => {
      const isDefault = combo.id === defaultCombination.id;
      console.log(FLI6L2YX_cjs.formatVersionCombination(combo, isDefault));
    });
    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.30.0 build  # Auto-selects compatible solana version");
  console.log("  ANCHOR_VERSION=0.29.0 lz-tool anchor build    # Using environment variables");
  console.log();
}
VO65XOWD_cjs.__name(displayVersionCombinations, "displayVersionCombinations");
function displayToolVersionInfo(toolName) {
  const tool = DWHHPWIY_cjs.findToolByName(toolName);
  if (!tool) {
    console.error(`\u274C Tool '${toolName}' not found`);
    return;
  }
  const typeTools = DWHHPWIY_cjs.findToolsByType(tool.toolType);
  const matrix = DWHHPWIY_cjs.findMatrixByType(tool.toolType);
  const defaultVersion = DWHHPWIY_cjs.getToolDefaultVersion(tool.name);
  const supportedVersions = DWHHPWIY_cjs.getToolSupportedVersions(tool.name);
  console.log(`
\u{1F527} ${tool.name.toUpperCase()} Version Information`);
  console.log("\u2500".repeat(40));
  console.log(`Type: ${tool.toolType}`);
  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();
  }
  if (matrix && typeTools.length > 1) {
    const defaultCombination = DWHHPWIY_cjs.findDefaultCombination(matrix);
    console.log("\u{1F517} Compatible combinations with other tools:");
    matrix.combinations.forEach((combo) => {
      const toolVersion = combo.versions[tool.name];
      if (toolVersion != null && toolVersion.length > 0) {
        const isDefault = combo.id === defaultCombination.id;
        console.log(FLI6L2YX_cjs.formatVersionCombination(combo, isDefault));
      }
    });
    console.log();
  }
  console.log("\u{1F4DD} Version resolution priority:");
  console.log("  1. Command line options (--{tool}-version)");
  console.log(`  2. Environment variables (${tool.name.toUpperCase()}_VERSION)`);
  console.log("  3. .versions file");
  console.log("  4. Default version");
  console.log();
}
VO65XOWD_cjs.__name(displayToolVersionInfo, "displayToolVersionInfo");

exports.displayToolVersionInfo = displayToolVersionInfo;
exports.displayVersionCombinations = displayVersionCombinations;
//# sourceMappingURL=T7SZKDWZ.cjs.map
//# sourceMappingURL=T7SZKDWZ.cjs.map