"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransactionGroupResolver = void 0;
const symbol_sdk_1 = require("symbol-sdk");
const options_resolver_1 = require("../options-resolver");
const transactionGroup_validator_1 = require("../validators/transactionGroup.validator");
/**
 * Transaction group resolver
 */
class TransactionGroupResolver {
    /**
     * Resolves a transaction group provided by the user.
     * @param {Options} options - Command options.
     * @param {string} altText - Alternative text.
     * @param {string} altKey - Alternative key.
     * @returns {Promise<TransactionGroup>}
     */
    async resolve(options, altText, altKey) {
        const choices = [
            {
                title: 'Confirmed',
                value: symbol_sdk_1.TransactionGroup.Confirmed,
            },
            {
                title: 'Unconfirmed',
                value: symbol_sdk_1.TransactionGroup.Unconfirmed,
            },
            {
                title: 'Partial',
                value: symbol_sdk_1.TransactionGroup.Partial,
            },
        ];
        return await (0, options_resolver_1.OptionsChoiceResolver)(options, altKey ? altKey : 'group', altText ? altText : 'Select a group:', choices, 'select', new transactionGroup_validator_1.TransactionGroupValidator());
    }
}
exports.TransactionGroupResolver = TransactionGroupResolver;
