"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatUnknownOptionsError = void 0;
const chalk = require("chalk");
function formatUnknownOptionsError(unknownOptions) {
    let output = chalk.bgRed.black('\u2009ERROR\u2009');
    const unknownOptionsArray = Array.from(unknownOptions.keys());
    if (unknownOptionsArray.length > 1) {
        return `${output} ${chalk.red(`Unknown options: ${unknownOptionsArray.map(unknownOption => `'${unknownOption}'`).join(', ')}`)}`;
    }
    const unknownOption = unknownOptionsArray[0];
    output += ` ${chalk.red(`Unknown option: '${unknownOption}'`)}`;
    const didYouMeanOptions = unknownOptions.get(unknownOption);
    if (!(didYouMeanOptions === null || didYouMeanOptions === void 0 ? void 0 : didYouMeanOptions.length)) {
        return output;
    }
    return `${output}\nDid you mean '${didYouMeanOptions.join("', or '")}'?`;
}
exports.formatUnknownOptionsError = formatUnknownOptionsError;
