using System;

namespace Volpe.Cafe.UI
{
    /// <summary>
    /// Contains event data for generated prompt messages.
    /// </summary>
    public class PromptEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PromptEventArgs"/> class, using the specified message title,
        /// message body, and the prompt options the user can select.
        /// </summary>
        /// <param name="title">The message title of the prompt.</param>
        /// <param name="message">The message body of the prompt.</param>
        /// <param name="promptOption">The prompt options the user can select.</param>
        public PromptEventArgs(string title, string message, PromptOption promptOption) : base()
        {
            this.Title = title;
            this.Message = message;
            this.PromptOption = promptOption;
            this.PromptResult = PromptResult.None;
        }

        /// <summary>Gets the message title of the prompt.</summary>
        public string Title { get; }
        /// <summary>Gets the actual messages of the prompt.</summary>
        public string Message { get; }
        /// <summary>Gets the prompt options the user can select.</summary>
        public PromptOption PromptOption { get; }
        /// <summary>Gets or sets the user response to a message prompt.</summary>
        public PromptResult PromptResult { get; set; }

        /// <summary>
        /// Returns the string representation of this <see cref="PromptEventArgs"/> instance.
        /// </summary>
        /// <returns>The string representation of the <see cref="PromptEventArgs"/> instance.</returns>
        public override string ToString()
        {
            return $"{this.Title} - {this.Message}";
        }

    }
}
