"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RestrictionValueResolver = void 0;
const options_resolver_1 = require("../options-resolver");
const integer_validator_1 = require("../validators/integer.validator");
/**
 * Restriction value resolver
 */
class RestrictionValueResolver {
    /**
     * Resolve a restriction value provided by a user.
     * @param {Options} options - Command options.
     * @param {string} altText - Alternative text.
     * @param {string} altKey - Alternative key.
     * @return {Promise<string>}
     */
    async resolve(options, altText, altKey) {
        const value = await (0, options_resolver_1.OptionsResolver)(options, altKey ? altKey : 'newRestrictionValue', () => undefined, altText ? altText : 'Enter new restriction value:', 'text', new integer_validator_1.IntegerStringValidator());
        return value;
    }
}
exports.RestrictionValueResolver = RestrictionValueResolver;
