namespace Inspectron.Epson.PrintServer.Printers.Utils.KitchenReceipt
{
    /// <summary>
    /// Represents a restaurant receipt from Warme Küche
    /// </summary>
    public class KitchenReceipt
    {
        /// <summary>
        /// Restaurant name
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// Date and time of the transaction
        /// </summary>
        public DateTime TransactionDateTime { get; set; }

        /// <summary>
        /// Receipt number
        /// </summary>
        public string ReceiptNumber { get; set; }

        /// <summary>
        /// Server/Waiter name
        /// </summary>
        public string WaiterName { get; set; }

        /// <summary>
        /// Server/Waiter ID
        /// </summary>
        public string WaiterId { get; set; }

        /// <summary>
        /// Table number
        /// </summary>
        public string TableNumber { get; set; }

        public string SpecialInstruction { get; set; }

        public List<Gang> Gangs { get; set; } = new List<Gang>();

        public List<Dish> Dishes { get; set; } = new List<Dish>();

        
        public KitchenReceipt()
        {
            Gangs = new List<Gang>();
        
        }
    }


    public class Gang
    {
        public Gang(int id, string name)
        {
            Id = id;
            Name = name;
        }

        public int Id { get; set; }
        public string Name { get; set; }
        public List<Dish> Dishes { get; set; } = new List<Dish>();
    }

    /// <summary>
    /// Represents a dish item on the receipt
    /// </summary>
    public class Dish
    {
        /// <summary>
        /// Number ordered
        /// </summary>
        public int Number { get; set; }

        /// <summary>
        /// Name of the dish
        /// </summary>
        public string Name { get; set; }

        public Dish(){}

        public int? GuestId { get; set; }

        public Dish(int number, string name)
        {
            Number = number;
            Name = name;
        }

        public DishModifications Modifications { get; set; } = new DishModifications();
        public string? Comment { get; set; }
    }

    public class DishModifications
    {
        public List<string> Removed { get; set; } = new List<string>();
        public List<string> Added { get; set; } = new List<string>();
    }

}