"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const i18n_1 = __importDefault(require("@mongosh/i18n"));
const enums_1 = require("./enums");
const DEFAULT_TRANSLATE = i18n_1.default.translateApiHelp.bind(i18n_1.default);
class Help {
    constructor(properties, options = { translate: DEFAULT_TRANSLATE }) {
        this.attr = [];
        this.help = options.translate(properties.help);
        this.docs = options.translate(properties.docs);
        this.attr = (properties.attr || [])
            .map((attr) => ({
            name: attr.name,
            description: options.translate(attr.description),
        }))
            .filter((attr) => attr.description);
    }
    [enums_1.asPrintable]() {
        const { help, docs, attr } = this;
        return { help, docs, attr };
    }
    get [enums_1.shellApiType]() {
        return 'Help';
    }
}
exports.default = Help;
//# sourceMappingURL=help.js.map