using System.Collections.Generic;
using Net.Eagle0.Eagle.Views;

namespace eagle.Notifications {
    public static class FailedSwearBrotherhoodNotificationGenerator {
        public static readonly NotificationGenerator Generator = GenerateNotification;

        private static IEnumerable<Notification> GenerateNotification(
                ActionResultView actionResultView,
                IGameModel currentModel) {
            var hero = currentModel.Heroes[actionResultView.Leader.Value];
            string textTemplate =
                    "{DecliningHero} feels you are too different to swear eternal brotherhood.";

            var heroPlaceholders = new Dictionary<string, (string nameTextId, string fallback)> {
                { "DecliningHero", (hero.NameTextId, "The hero") }
            };

            yield return new DynamicTextNotification(
                    title: "Oath Declined",
                    textTemplate: textTemplate,
                    heroPlaceholders: heroPlaceholders,
                    singleProvinceId: actionResultView.GameStateDiff.ChangedProvinces[0].Id,
                    displayedHeroes: new List<HeroView> { hero });
        }
    }
}