using adas_core.Domain.Enums;
using MongoDB.Bson;

namespace adas_core.Domain.Models.MongoModels;

public class Section
{
    // ReSharper disable once InconsistentNaming
    public ObjectId _id { get; set; }

    public string Id { get; set; } = string.Empty;


    public string? SectionTitle { get; set; }


    public string? PointOfCare { get; set; }


    public DateTime? LastUpdate { get; set; }

    public Dictionary<string, object> Configuration { get; set; } = [];

    public SectionConfig? SectionConfig { get; set; }
    public UiFontData? DesignProperties { get; set; }

    public Dictionary<string, List<PointOfCare>> PointOfCareList { get; set; } = new();

    public List<SectionItem> Items { get; set; } = [];

    public StatusEnum.Type? Status { get; set; } = null;

    public bool Equals(Section? other)
    {
        return other != null &&
               Id == other.Id;
    }

    public override string ToString()
    {
        return "[Section id: " + Id + "]";
    }

    public class SectionItem
    {
        public string? Group { get; set; }
        public List<Box> Boxes { get; set; } = [];
    }
}