"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DivisibilityResolver = void 0;
const options_resolver_1 = require("../options-resolver");
const integer_validator_1 = require("../validators/integer.validator");
/**
 * Divisibility resolver
 */
class DivisibilityResolver {
    /**
     * Resolves a divisibility provided by the user.
     * @param {Options} options - Command options.
     * @param {string} altText - Alternative text.
     * @param {string} altKey - Alternative key.
     * @returns {Promise<number>}
     */
    async resolve(options, altText, altKey) {
        const resolution = +(await (0, options_resolver_1.OptionsResolver)(options, altKey ? altKey : 'divisibility', () => undefined, altText ? altText : 'Enter the mosaic divisibility:', 'number', new integer_validator_1.IntegerValidator()));
        return resolution;
    }
}
exports.DivisibilityResolver = DivisibilityResolver;
