'use strict';

var VO65XOWD_cjs = require('./VO65XOWD.cjs');

// src/display/formatters.ts
VO65XOWD_cjs.init_cjs_shims();
function formatVersionCombination(combination, isDefault) {
  const versionPairs = Object.entries(combination.versions).filter(([_, version]) => version !== void 0).map(([tool, version]) => `${tool}:${version}`).join(", ");
  const patchInfo = combination.patch ? ` [patch: ${combination.patch}]` : "";
  const badges = [];
  if (isDefault === true) badges.push("\u{1F3AF} Default");
  else if (combination.isRecommended === true) badges.push("\u2705 Stable");
  if (combination.description != null && combination.description !== "") badges.push(`\u{1F4DD} ${combination.description}`);
  const badgeStr = badges.length > 0 ? ` (${badges.join(", ")})` : "";
  return `  ${combination.id}: ${versionPairs}${patchInfo}${badgeStr}`;
}
VO65XOWD_cjs.__name(formatVersionCombination, "formatVersionCombination");
function createUserFriendlyError(error, context) {
  let message = `\u274C ${error}
`;
  if (context?.toolName != null && context.toolName !== "" && context.requestedVersion != null && context.requestedVersion !== "" && context.availableVersions != null) {
    message += `
\u{1F4A1} Suggestions for ${context.toolName}:`;
    message += `
   Requested: ${context.requestedVersion}`;
    message += `
   Available: ${context.availableVersions.join(", ")}`;
  }
  if (context?.suggestedCombinations && context.suggestedCombinations.length > 0) {
    message += `

\u{1F3AF} Suggested options:`;
    context.suggestedCombinations.forEach((combo) => {
      message += `
   ${combo}`;
    });
  }
  message += `

\u{1F4DA} For more help: lz-tool --list-versions`;
  return message;
}
VO65XOWD_cjs.__name(createUserFriendlyError, "createUserFriendlyError");

exports.createUserFriendlyError = createUserFriendlyError;
exports.formatVersionCombination = formatVersionCombination;
//# sourceMappingURL=FLI6L2YX.cjs.map
//# sourceMappingURL=FLI6L2YX.cjs.map