
using System.Collections.Generic;

namespace MenuGenerator.Models
{
    public enum MenuItemType
    {
        FOLDER = 0,
        INTEGER = 1,
        BOOLEAN = 2,
        TEMPERATURE = 3,
        TEMPERATURE_HIGH = 4,
        PERCENTAGE = 5,
        YEAR = 6,
        MONTH = 7,
        DAY = 8,
        HOUR = 9,
        MINUTE = 10,
        ACTION = 11,
        INFO = 12
    }

    /// <summary>
    /// Модель одного пункта меню (переименовано из MenuNode -> MenuNode
    /// во избежание конфликта с System.Windows.Forms.MenuNode)
    /// </summary>
    public class MenuNode
    {
        public string Name { get; set; } = "Item";
        public MenuItemType Type { get; set; } = MenuItemType.FOLDER;
        public int Value { get; set; } = 0;
        public int MinValue { get; set; } = 0;
        public int MaxValue { get; set; } = 100;
        public int Step { get; set; } = 1;

        public int Parent { get; set; } = 0;
        public int FirstChild { get; set; } = 0;
        public int LastChild { get; set; } = 0;

        public List<MenuNode> Children { get; set; } = new List<MenuNode>();

        public override string ToString() => Name;
    }
}