using System;

namespace EonaCat.Logger.Managers
{
    // This file is part of the EonaCat project(s) which is released under the Apache License.
    // See the LICENSE file or go to https://EonaCat.com/License for full license details.

    /// <summary>
    /// Colors to use when writing to the console.
    /// </summary>
    public class ColorSchema
    {
        /// <summary>
        /// The color to use for debug messages.
        /// </summary>
        public ColorScheme Debug = new ColorScheme(ConsoleColor.Green, ConsoleColor.Black);

        /// <summary>
        /// The color to use for informational messages.
        /// </summary>
        public ColorScheme Info = new ColorScheme(ConsoleColor.Blue, ConsoleColor.Black);

        /// <summary>
        /// The color to use for warning messages.
        /// </summary>
        public ColorScheme Warning = new ColorScheme(ConsoleColor.DarkYellow, ConsoleColor.Black);

        /// <summary>
        /// The color to use for error messages.
        /// </summary>
        public ColorScheme Error = new ColorScheme(ConsoleColor.Red, ConsoleColor.Black);

        /// <summary>
        /// The color to use for alert messages.
        /// </summary>
        public ColorScheme Traffic = new ColorScheme(ConsoleColor.DarkMagenta, ConsoleColor.Black);

        /// <summary>
        /// The color to use for critical messages.
        /// </summary>
        public ColorScheme Critical = new ColorScheme(ConsoleColor.DarkRed, ConsoleColor.Black);

        /// <summary>
        /// The color to use for emergency messages.
        /// </summary>
        public ColorScheme Trace = new ColorScheme(ConsoleColor.Cyan, ConsoleColor.Black);
    }

    /// <summary>
    /// Color scheme for logging messages.
    /// </summary>
    public class ColorScheme
    {
        /// <summary>
        /// Foreground color.
        /// </summary>
        public ConsoleColor Foreground = Console.ForegroundColor;

        /// <summary>
        /// Background color.
        /// </summary>
        public ConsoleColor Background = Console.BackgroundColor;

        /// <summary>
        /// Instantiates a new color scheme.
        /// </summary>
        /// <param name="foreground">Foreground color.</param>
        /// <param name="background">Background color.</param>
        public ColorScheme(ConsoleColor foreground, ConsoleColor background)
        {
            Foreground = foreground;
            Background = background;
        }
    }
}