using System;

namespace Nox.Game {
    public static class DefaultCharacterSystemsFactory {
        public static ICharacterSystems Create(
            StarterCharacterSettings starterCharacterSettings,
            PerksRegistry perksRegistry,
            CharacterRegistry characterRegistry,
            ModifiersRegistry modifiersRegistry) {
            IPerkFactory perkFactory = new PerkFactory(perksRegistry);
            IModifiersFactory modifiersFactory = new ModifiersFactory(modifiersRegistry);
            ICharacterAttributesFactory attributesFactory = new CharacterAttributesFactory(characterRegistry);
            ICharacterStatsFactory statsFactory = new CharacterStatsFactory(characterRegistry);
            ICharacterFactory characterFactory = new CharacterFactory(attributesFactory, statsFactory, perkFactory, modifiersFactory);
            IPartyFactory partyFactory = new PartyFactory(starterCharacterSettings);

            return new CharacterSystems(perkFactory, modifiersFactory, characterFactory, partyFactory);
        }
    }
}
