using System;
using System.Collections.Generic;
using System.Linq;

namespace VOID.Generic.Objects.Unit.DataCalculator
{
    public interface ICalcGroup
    {
        public string GetMarkerGroup();
        public IEnumerable<string> GetMarkerItems();
        public Type GetEnumType();
        public IEnumerable<Enum> GetEnums();
        public Enum GetEnum(string markerItem);

        public bool CheckMarker(string markerGroup, string markerItem)
        {
            return GetMarkerGroup().Equals(markerGroup, StringComparison.OrdinalIgnoreCase)
                   && GetMarkerItems().Contains(markerItem, StringComparer.OrdinalIgnoreCase);
        }

        public bool CheckEnum(Enum @enum)
        {
            return GetEnums().Contains(@enum);
        }

        public float GetEffectValue(UnitObject unit, string markerItem); 
        public float GetBaseValue(UnitObject unit, string markerItem);
        public float GetValue(UnitObject unit, string markerItem);
        
        public void UpdateWithValue(UnitObject unit, string markerItem, float formulaValue);
    }
}