using EFT.Interactive;
using UnityEngine.UI;
using UnityEngine;

namespace EscapeFromTarkovCheat.Features
{
    public enum Skill { 
        STRENGTH,
        STRESSRESISTANCE,
        MAGDRILLS,
        MELEE,
        HIDEOUTMANAGEMENT,
        CRAFTING,
        HEAVYVESTS,
        LIGHTVESTS,
        LMG,
        ASSAULT,
        PISTOL,
        PERCEPTION,
        SNIPER,
        SNIPING,
        ENDURANCE,
        THROWING,
        CHARISMA,
        HEALTH,
        VITALITY,
        METABOLISM,
        IMMUNITY,
        SURGERY,
        INTELLECT,
        ATTENTION,
        REVOLVER,
        SHOTGUN,
        HMG,
        DMR,
        AIMDRILLS,
        SEARCH,
        WEAPONTREATMENT,
        TROUBLESHOOTING,
        COVERTMOVEMENT,
        SMG
    }
    public class Skills
    {
        public void MaxAll()
        {
            if (Main.notReady())
                return;
            Main.LocalPlayer.Skills.Strength.SetLevel(51);
            Main.LocalPlayer.Skills.StressResistance.SetLevel(51);
            Main.LocalPlayer.Skills.MagDrills.SetLevel(51);
            Main.LocalPlayer.Skills.Melee.SetLevel(51);
            Main.LocalPlayer.Skills.HideoutManagement.SetLevel(51);
            Main.LocalPlayer.Skills.Crafting.SetLevel(51);
            Main.LocalPlayer.Skills.HeavyVests.SetLevel(51);
            Main.LocalPlayer.Skills.LightVests.SetLevel(51);
            Main.LocalPlayer.Skills.LMG.SetLevel(51);
            Main.LocalPlayer.Skills.Assault.SetLevel(51);
            Main.LocalPlayer.Skills.Pistol.SetLevel(51);
            Main.LocalPlayer.Skills.Perception.SetLevel(51);
            Main.LocalPlayer.Skills.Sniper.SetLevel(51);
            Main.LocalPlayer.Skills.Sniping.SetLevel(51);
            Main.LocalPlayer.Skills.Endurance.SetLevel(51);
            Main.LocalPlayer.Skills.Throwing.SetLevel(51);
            Main.LocalPlayer.Skills.Charisma.SetLevel(51);
            Main.LocalPlayer.Skills.Health.SetLevel(51);
            Main.LocalPlayer.Skills.Vitality.SetLevel(51);
            Main.LocalPlayer.Skills.Metabolism.SetLevel(51);
            Main.LocalPlayer.Skills.Immunity.SetLevel(51);
            Main.LocalPlayer.Skills.Intellect.SetLevel(51);
            Main.LocalPlayer.Skills.Attention.SetLevel(51);
            Main.LocalPlayer.Skills.Revolver.SetLevel(51);
            Main.LocalPlayer.Skills.Shotgun.SetLevel(51);
            Main.LocalPlayer.Skills.HMG.SetLevel(51);
            Main.LocalPlayer.Skills.DMR.SetLevel(51);
            Main.LocalPlayer.Skills.AimDrills.SetLevel(51);
            Main.LocalPlayer.Skills.Search.SetLevel(51);
            Main.LocalPlayer.Skills.WeaponTreatment.SetLevel(51);
            Main.LocalPlayer.Skills.TroubleShooting.SetLevel(51);
            Main.LocalPlayer.Skills.CovertMovement.SetLevel(51);
            Main.LocalPlayer.Skills.SMG.SetLevel(51);
            Main.LocalPlayer.Skills.Surgery.SetLevel(51);
        }

        public int Get(Skill skill) {
            if (Main.GameWorld == null) return 0;
            switch (skill)
            {
                case Skill.STRENGTH:
                    return Main.LocalPlayer.Skills.Strength.Level;
                case Skill.STRESSRESISTANCE:
                    return Main.LocalPlayer.Skills.StressResistance.Level;
                case Skill.MAGDRILLS:
                    return Main.LocalPlayer.Skills.MagDrills.Level;
                case Skill.MELEE:
                    return Main.LocalPlayer.Skills.Melee.Level;
                case Skill.HIDEOUTMANAGEMENT:
                    return Main.LocalPlayer.Skills.HideoutManagement.Level;
                case Skill.CRAFTING:
                    return Main.LocalPlayer.Skills.Crafting.Level;
                case Skill.HEAVYVESTS:
                    return Main.LocalPlayer.Skills.HeavyVests.Level;
                case Skill.LIGHTVESTS:
                    return Main.LocalPlayer.Skills.LightVests.Level;
                case Skill.LMG:
                    return Main.LocalPlayer.Skills.LMG.Level;
                case Skill.ASSAULT:
                    return Main.LocalPlayer.Skills.Assault.Level;
                case Skill.PISTOL:
                    return Main.LocalPlayer.Skills.Pistol.Level;
                case Skill.PERCEPTION:
                    return Main.LocalPlayer.Skills.Perception.Level;
                case Skill.SNIPER:
                    return Main.LocalPlayer.Skills.Sniper.Level;
                case Skill.SNIPING:
                    return Main.LocalPlayer.Skills.Sniping.Level;
                case Skill.ENDURANCE:
                    return Main.LocalPlayer.Skills.Endurance.Level;
                case Skill.THROWING:
                    return Main.LocalPlayer.Skills.Throwing.Level;
                case Skill.CHARISMA:
                    return Main.LocalPlayer.Skills.Charisma.Level;
                case Skill.HEALTH:
                    return Main.LocalPlayer.Skills.Health.Level;
                case Skill.VITALITY:
                    return Main.LocalPlayer.Skills.Vitality.Level;
                case Skill.METABOLISM:
                    return Main.LocalPlayer.Skills.Metabolism.Level;
                case Skill.IMMUNITY:
                    return Main.LocalPlayer.Skills.Immunity.Level;
                case Skill.COVERTMOVEMENT:
                    return Main.LocalPlayer.Skills.CovertMovement.Level;
                case Skill.INTELLECT:
                    return Main.LocalPlayer.Skills.Intellect.Level;
                case Skill.ATTENTION:
                    return Main.LocalPlayer.Skills.Attention.Level;
                case Skill.REVOLVER:
                    return Main.LocalPlayer.Skills.Revolver.Level;
                case Skill.SHOTGUN:
                    return Main.LocalPlayer.Skills.Shotgun.Level;
                case Skill.HMG:
                    return Main.LocalPlayer.Skills.HMG.Level;
                case Skill.DMR:
                    return Main.LocalPlayer.Skills.DMR.Level;
                case Skill.AIMDRILLS:
                    return Main.LocalPlayer.Skills.AimDrills.Level;
                case Skill.SEARCH:
                    return Main.LocalPlayer.Skills.Search.Level;
                case Skill.WEAPONTREATMENT:
                    return Main.LocalPlayer.Skills.WeaponTreatment.Level;
                case Skill.TROUBLESHOOTING:
                    return Main.LocalPlayer.Skills.TroubleShooting.Level;
                case Skill.SURGERY:
                    return Main.LocalPlayer.Skills.Surgery.Level;
                case Skill.SMG:
                    return Main.LocalPlayer.Skills.SMG.Level;
                default:
                    return 0;
            }
        }

        public void Commit(Skill skill, int level) {
            if (Main.notReady()) return;
            switch (skill)
            {
                case Skill.STRENGTH:
                    if (Main.LocalPlayer.Skills.Strength.Level != level) Main.LocalPlayer.Skills.Strength.SetLevel(level); break;
                case Skill.STRESSRESISTANCE:
                    if (Main.LocalPlayer.Skills.StressResistance.Level != level) Main.LocalPlayer.Skills.StressResistance.SetLevel(level); break;
                case Skill.MAGDRILLS:
                    if (Main.LocalPlayer.Skills.MagDrills.Level != level) Main.LocalPlayer.Skills.MagDrills.SetLevel(level); break;
                case Skill.MELEE:
                    if (Main.LocalPlayer.Skills.Melee.Level != level) Main.LocalPlayer.Skills.Melee.SetLevel(level); break;
                case Skill.HIDEOUTMANAGEMENT:
                    if (Main.LocalPlayer.Skills.HideoutManagement.Level != level) Main.LocalPlayer.Skills.HideoutManagement.SetLevel(level); break;
                case Skill.CRAFTING:
                    if (Main.LocalPlayer.Skills.Crafting.Level != level) Main.LocalPlayer.Skills.Crafting.SetLevel(level); break;
                case Skill.HEAVYVESTS:
                    if (Main.LocalPlayer.Skills.HeavyVests.Level != level) Main.LocalPlayer.Skills.HeavyVests.SetLevel(level); break;
                case Skill.LIGHTVESTS:
                    if (Main.LocalPlayer.Skills.LightVests.Level != level) Main.LocalPlayer.Skills.LightVests.SetLevel(level); break;
                case Skill.LMG:
                    if (Main.LocalPlayer.Skills.LMG.Level != level) Main.LocalPlayer.Skills.LMG.SetLevel(level); break;
                case Skill.ASSAULT:
                    if (Main.LocalPlayer.Skills.Assault.Level != level) Main.LocalPlayer.Skills.Assault.SetLevel(level); break;
                case Skill.PISTOL:
                    if (Main.LocalPlayer.Skills.Pistol.Level != level) Main.LocalPlayer.Skills.Pistol.SetLevel(level); break;
                case Skill.PERCEPTION:
                    if (Main.LocalPlayer.Skills.Perception.Level != level) Main.LocalPlayer.Skills.Perception.SetLevel(level); break;
                case Skill.SNIPER:
                    if (Main.LocalPlayer.Skills.Sniper.Level != level) Main.LocalPlayer.Skills.Sniper.SetLevel(level); break;
                case Skill.SNIPING:
                    if (Main.LocalPlayer.Skills.Sniping.Level != level) Main.LocalPlayer.Skills.Sniping.SetLevel(level); break;
                case Skill.ENDURANCE:
                    if (Main.LocalPlayer.Skills.Endurance.Level != level) Main.LocalPlayer.Skills.Endurance.SetLevel(level); break;
                case Skill.THROWING:
                    if (Main.LocalPlayer.Skills.Throwing.Level != level) Main.LocalPlayer.Skills.Throwing.SetLevel(level); break;
                case Skill.CHARISMA:
                    if (Main.LocalPlayer.Skills.Charisma.Level != level) Main.LocalPlayer.Skills.Charisma.SetLevel(level); break;
                case Skill.HEALTH:
                    if (Main.LocalPlayer.Skills.Health.Level != level) Main.LocalPlayer.Skills.Health.SetLevel(level); break;
                case Skill.VITALITY:
                    if (Main.LocalPlayer.Skills.Vitality.Level != level) Main.LocalPlayer.Skills.Vitality.SetLevel(level); break;
                case Skill.METABOLISM:
                    if (Main.LocalPlayer.Skills.Metabolism.Level != level) Main.LocalPlayer.Skills.Metabolism.SetLevel(level); break;
                case Skill.IMMUNITY:
                    if (Main.LocalPlayer.Skills.Immunity.Level != level) Main.LocalPlayer.Skills.Immunity.SetLevel(level); break;
                case Skill.COVERTMOVEMENT:
                    if (Main.LocalPlayer.Skills.CovertMovement.Level != level) Main.LocalPlayer.Skills.CovertMovement.SetLevel(level); break;
                case Skill.INTELLECT:
                    if (Main.LocalPlayer.Skills.Intellect.Level != level) Main.LocalPlayer.Skills.Intellect.SetLevel(level); break;
                case Skill.ATTENTION:
                    if (Main.LocalPlayer.Skills.Attention.Level != level) Main.LocalPlayer.Skills.Attention.SetLevel(level); break;
                case Skill.REVOLVER:
                    if (Main.LocalPlayer.Skills.Revolver.Level != level) Main.LocalPlayer.Skills.Revolver.SetLevel(level); break;
                case Skill.SHOTGUN:
                    if (Main.LocalPlayer.Skills.Shotgun.Level != level) Main.LocalPlayer.Skills.Shotgun.SetLevel(level); break;
                case Skill.HMG:
                    if (Main.LocalPlayer.Skills.HMG.Level != level) Main.LocalPlayer.Skills.HMG.SetLevel(level); break;
                case Skill.DMR:
                    if (Main.LocalPlayer.Skills.DMR.Level != level) Main.LocalPlayer.Skills.DMR.SetLevel(level); break;
                case Skill.AIMDRILLS:
                    if (Main.LocalPlayer.Skills.AimDrills.Level != level) Main.LocalPlayer.Skills.AimDrills.SetLevel(level); break;
                case Skill.SEARCH:
                    if (Main.LocalPlayer.Skills.Search.Level != level) Main.LocalPlayer.Skills.Search.SetLevel(level); break;
                case Skill.WEAPONTREATMENT:
                    if (Main.LocalPlayer.Skills.WeaponTreatment.Level != level) Main.LocalPlayer.Skills.WeaponTreatment.SetLevel(level); break;
                case Skill.TROUBLESHOOTING:
                    if (Main.LocalPlayer.Skills.TroubleShooting.Level != level) Main.LocalPlayer.Skills.TroubleShooting.SetLevel(level); break;
                case Skill.SURGERY:
                    if (Main.LocalPlayer.Skills.Surgery.Level != level) Main.LocalPlayer.Skills.Surgery.SetLevel(level); break;
                case Skill.SMG:
                    if (Main.LocalPlayer.Skills.SMG.Level != level) Main.LocalPlayer.Skills.SMG.SetLevel(level); break;
                default:
                    break;
            }
        }
    }
}
