using aeqw89.DataKeys;
using aeqw89.PersistentData;
using Beam.Abstractions;

namespace Beam.Models;

public class ResourceDefinition {
    public required DataKey<ResourceDefinition> Key { get; init; }
    public required MetaData Meta { get; init; }
    public required Table<IDataProvider> Elements { get; init; }
    public required UrlLocation Location { get; init; }
    public required Table<ResourceRelation> Relations { get; init; }

    public class MetaData {
        public required string Name { get; init; }
        public required string Author { get; init; }
        public string? Description { get; init; }
        public string? ProjectUrl { get; init; }
    }

    public class UrlLocation {
        public required ILinkBuilder Segments { get; init; }
        public required List<ImmutableState> States { get; init; }
        public required IStateChangerFactory StateChanger { get; init; }
    }
}