"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeadlineResolver = void 0;
const symbol_sdk_1 = require("symbol-sdk");
const options_resolver_1 = require("../options-resolver");
const deadline_validator_1 = require("../validators/deadline.validator");
/**
 * Deadline resolver
 */
class DeadlineResolver {
    /**
     * Resolves deadline(ms) provided by the user.
     * @param {Options} options - Command options.
     * @param {string} altText - Alternative text.
     * @param {string} altKey - Alternative key.
     * @returns {Promise<Deadline>}
     */
    async resolve(options, altText, altKey) {
        const resolution = await (0, options_resolver_1.OptionsResolver)(options, altKey ? altKey : 'deadline', () => undefined, altText ? altText : 'Enter deadline (milliseconds since Nemesis block):', 'text', new deadline_validator_1.DeadlineValidator());
        return symbol_sdk_1.Deadline.createFromDTO(resolution);
    }
}
exports.DeadlineResolver = DeadlineResolver;
