"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeltaResolver = void 0;
const options_resolver_1 = require("../options-resolver");
const integer_validator_1 = require("../validators/integer.validator");
/**
 * Delta resolver
 */
class DeltaResolver {
    /**
     * Resolves a delta value 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 options_resolver_1.OptionsResolver(options, altKey ? altKey : 'delta', () => undefined, altText, 'number', new integer_validator_1.IntegerValidator());
        return +resolution;
    }
}
exports.DeltaResolver = DeltaResolver;
