"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MaxFeeResolver = void 0;
const symbol_sdk_1 = require("symbol-sdk");
const options_resolver_1 = require("../options-resolver");
const integer_validator_1 = require("../validators/integer.validator");
/**
 * Max fee resolver
 */
class MaxFeeResolver {
    /**
     * Resolves a max fee provided by the user.
     * @param {Options} options - Command options.
     * @param {string} altText - Alternative text.
     * @param {string} altKey - Alternative key.
     * @returns {Promise<UInt64>}
     */
    async resolve(options, altText, altKey) {
        const resolution = await (0, options_resolver_1.OptionsResolver)(options, altKey ? altKey : 'maxFee', () => undefined, altText ? altText : 'Enter the maximum fee (absolute amount):', 'text', new integer_validator_1.IntegerStringValidator());
        return symbol_sdk_1.UInt64.fromNumericString(resolution);
    }
}
exports.MaxFeeResolver = MaxFeeResolver;
