/// <summary>
        /// Adds multiple choices.
        /// </summary>
        /// <typeparam name="T">The prompt result type.</typeparam>
        /// <param name="obj">The prompt.</param>
        /// <param name="choices">The choices to add.</param>
        /// <returns>The same instance so that multiple calls can be chained.</returns>
        public static SelectionPrompt <T> AddChoices <T>(this SelectionPrompt <T> obj, IEnumerable <T> choices)
            where T : notnull
        {
            if (obj is null)
            {
                throw new ArgumentNullException(nameof(obj));
            }

            foreach (var choice in choices)
            {
                obj.AddChoice(choice);
            }

            return(obj);
        }
        /// <summary>
        /// Adds multiple grouped choices.
        /// </summary>
        /// <typeparam name="T">The prompt result type.</typeparam>
        /// <param name="obj">The prompt.</param>
        /// <param name="group">The group.</param>
        /// <param name="choices">The choices to add.</param>
        /// <returns>The same instance so that multiple calls can be chained.</returns>
        public static SelectionPrompt <T> AddChoiceGroup <T>(this SelectionPrompt <T> obj, T group, IEnumerable <T> choices)
            where T : notnull
        {
            if (obj is null)
            {
                throw new ArgumentNullException(nameof(obj));
            }

            var root = obj.AddChoice(group);

            foreach (var choice in choices)
            {
                root.AddChild(choice);
            }

            return(obj);
        }