public string KIndexLabelIconUrl(bool local = true)
 {
     return(KIndexData.KIndexLabelIconUrl(this.KIndexLabel, local));
 }
        public InfoFact[] InfoFacts(int year)
        {
            var ann = this.roky.Where(m => m.Rok == year).FirstOrDefault();

            List <InfoFact> facts = new List <InfoFact>();

            if (ann == null || ann.KIndexReady == false)
            {
                facts.Add(new InfoFact($"K-Index nespočítán. Organizace má méně než {Consts.MinSmluvPerYear} smluv za rok nebo malý objem smluv.", InfoFact.ImportanceLevel.Summary));
                return(facts.ToArray());
            }
            switch (ann.KIndexLabel)
            {
            case KIndexLabelValues.None:
                facts.Add(new InfoFact($"K-Index nespočítán. Organizace má méně než {Consts.MinSmluvPerYear} smluv za rok nebo malý objem smluv.", InfoFact.ImportanceLevel.Summary));
                return(facts.ToArray());

            case KIndexLabelValues.A:
                facts.Add(new InfoFact("Nevykazuje téměř žádné rizikové faktory.", InfoFact.ImportanceLevel.Summary));
                break;

            case KIndexLabelValues.B:
                facts.Add(new InfoFact("Chování s malou mírou rizikových faktorů.", InfoFact.ImportanceLevel.Summary));
                break;

            case KIndexLabelValues.C:
                facts.Add(new InfoFact("Částečně umožňuje rizikové jednání.", InfoFact.ImportanceLevel.Summary));
                break;

            case KIndexLabelValues.D:
                facts.Add(new InfoFact("Vyšší míra rizikových faktorů.", InfoFact.ImportanceLevel.Summary));
                break;

            case KIndexLabelValues.E:
                facts.Add(new InfoFact("Vysoký výskyt rizikových faktorů.", InfoFact.ImportanceLevel.Summary));
                break;

            case KIndexLabelValues.F:
                facts.Add(new InfoFact("Velmi vysoká míra rizikových faktorů.", InfoFact.ImportanceLevel.Summary));
                break;

            default:
                break;
            }
            KIndexParts?bestPart  = null;
            KIndexParts?worstPart = null;
            var         sBest     = Best(ann, year, this.Ico, out bestPart);
            var         sworst    = Worst(ann, year, this.Ico, out worstPart);

            //A-C dej pozitivni prvni
            if (ann.KIndexLabel == KIndexLabelValues.A ||
                ann.KIndexLabel == KIndexLabelValues.B ||
                ann.KIndexLabel == KIndexLabelValues.C
                )
            {
                if (!string.IsNullOrEmpty(sBest))
                {
                    facts.Add(new InfoFact(sBest, InfoFact.ImportanceLevel.Stat));
                }
                if (!string.IsNullOrEmpty(sworst))
                {
                    facts.Add(new InfoFact(sworst, InfoFact.ImportanceLevel.Stat));
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(sworst))
                {
                    facts.Add(new InfoFact(sworst, InfoFact.ImportanceLevel.Stat));
                }
                if (!string.IsNullOrEmpty(sBest))
                {
                    facts.Add(new InfoFact(sBest, InfoFact.ImportanceLevel.Stat));
                }
            }
            foreach (var part in ann.OrderedValuesFromBestForInfofacts(this.Ico).Reverse())
            {
                if (part != bestPart && part != worstPart)
                {
                    var sFacts = KIndexData.KIndexCommentForPart(part, ann);
                    if (!string.IsNullOrEmpty(sFacts))
                    {
                        facts.Add(new InfoFact(sFacts, InfoFact.ImportanceLevel.High));
                    }
                }
            }

            return(facts.ToArray());
        }