"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SaveResolver = void 0;
const options_resolver_1 = require("../options-resolver");
/**
 * Save resolver
 */
class SaveResolver {
    /**
     * Resolves if the account has to be saved.
     * @param {CommandOptions} options - Command options.
     * @param {string} altText - Alternative text.
     * @returns {Promise<boolean>}
     */
    async resolve(options, altText) {
        if (await (0, options_resolver_1.OptionsConfirmResolver)(options, 'save', altText ? altText : 'Do you want to save the account?')) {
            options.save = true;
        }
        return options.save;
    }
}
exports.SaveResolver = SaveResolver;
