using MongoDB.Bson;

namespace adas_core.Domain.Models.Masters;

public class OptionList
{
    public ObjectId? Id { get; set; }
    public Locale? LocaleItems { get; set; }
    public string? OptionType { get; set; }
    public string Name { get; set; } = string.Empty;
    public string? IconDefault { get; set; }
    public string? IconCategory { get; set; } 
    public string? IconColor { get; set; } 
    public string? Color { get; set; }
    public string? BgColor { get; set; }
    public string? Description { get; set; }
    public DateTime? InitDate { get; set; }
    public DateTime? EndDate { get; set; }
    public bool? IsDefault { get; set; }

    public bool AreEqual(OptionList a, OptionList b)
    {
        return a.OptionType == b.OptionType &&
               a.Name == b.Name &&
               a.IconDefault == b.IconDefault &&
               a.IconCategory == b.IconCategory && 
               a.IconColor == b.IconColor && 
               a.Color == b.Color &&
               a.BgColor == b.BgColor &&
               a.IsDefault == b.IsDefault &&
               a.Description == b.Description &&
               a.InitDate == b.InitDate &&
               a.EndDate == b.EndDate;
    }

    public bool AreEqualExcludeDescription(OptionList a, OptionList b)
    {
        return a.OptionType == b.OptionType &&
               a.Name == b.Name &&
               a.IconDefault == b.IconDefault &&
               a.IconCategory == b.IconCategory &&
               a.IconColor == b.IconColor &&
               a.Color == b.Color &&
               a.BgColor == b.BgColor &&
               a.IsDefault == b.IsDefault &&
               a.InitDate == b.InitDate &&
               a.EndDate == b.EndDate;
    }
}

public class Locale
{
    public LocaleItem? Es { get; set; }
    public LocaleItem? Pt { get; set; }
    public LocaleItem? Ca { get; set; }
    public LocaleItem? Eng { get; set; }
    public LocaleItem? Zh { get; set; }
}

public class LocaleItem
{
    public string? Name { get; set; }
}

public enum LocaleEnum
{
    Default,
    Es,
    Pt,
    Ca,
    Eng,
    Zh
}