"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NetworkResolver = void 0;
const symbol_sdk_1 = require("symbol-sdk");
const options_resolver_1 = require("../options-resolver");
const network_validator_1 = require("../validators/network.validator");
/**
 * Restriction account address flags resolver
 */
class NetworkResolver {
    /**
     * Resolves a network type provided by the user.
     * @param {Options} options - Command options.
     * @param {string} altText - Alternative text.
     * @param {string} altKey - Alternative key.
     * @returns {Promise<any>}
     */
    async resolve(options, altText, altKey) {
        const choices = [
            { title: 'MAIN_NET', value: symbol_sdk_1.NetworkType.MAIN_NET },
            { title: 'TEST_NET', value: symbol_sdk_1.NetworkType.TEST_NET },
        ];
        const value = +(await (0, options_resolver_1.OptionsChoiceResolver)(options, altKey ? altKey : 'network', altText ? altText : 'Select the network type:', choices, 'select', new network_validator_1.NetworkValidator()));
        return value;
    }
}
exports.NetworkResolver = NetworkResolver;
