using System.Text.Json.Serialization;
using aeqw89.DataKeys;
using Beam.Abstractions;
using Beam.Models;

namespace Beam.Data {
    public class ResourceDictionary : IKeyed<ResourceDictionary>, IResourceDictionary {
        public required DataKey<ResourceDictionary> Key { get; set; }

        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
        public string? FriendlyName { get; set; }

        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
        public Dictionary<string, DataKey<WebResource>> Resources { get; set; } = [];

        [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
        public Dictionary<DataKey<WebResource>, ImmutableState> InitialStates { get; set; } = [];
    }
}
