using System.Collections.ObjectModel;
namespace NeonSprawl.Server.Game.Contracts;
/// In-memory contract template catalog loaded at startup (NEO-145). Game code should prefer for lookups.
public sealed class ContractTemplateCatalog(
string contractsDirectory,
IReadOnlyDictionary byId,
int catalogJsonFileCount)
{
/// Absolute path to the directory that was enumerated for *_contract_templates.json catalogs.
public string ContractsDirectory { get; } = contractsDirectory;
public IReadOnlyDictionary ById { get; } =
new ReadOnlyDictionary(new Dictionary(byId, StringComparer.Ordinal));
public int DistinctTemplateCount => ById.Count;
/// Number of *_contract_templates.json files under .
public int CatalogJsonFileCount { get; } = catalogJsonFileCount;
}