// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// *.txt files are not loaded automatically by TurboHUD
// you have to change this file's extension to .cs to enable it
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

using Turbo.Plugins.Default;
using Turbo.Plugins.User;
using SharpDX.DirectInput;
using System;

namespace Turbo.Plugins.User
{

    public class PluginEnablerOrDisablerPlugin : BasePlugin, ICustomizer
    {

        public PluginEnablerOrDisablerPlugin()
        {
            Enabled = true;
        }

        public override void Load(IController hud)
        {
            base.Load(hud);
        }

        // "Customize" methods are automatically executed after every plugin is loaded.
        // So these methods can use Hud.GetPlugin<class> to access the plugin instances' public properties (like decorators, Enabled flag, parameters, etc)
        // Make sure you test the return value against null!
        public void Customize()
        {

            Hud.TogglePlugin<CooldownSoundPlayerPlugin>(false);
            Hud.TogglePlugin<PortraitBottomStatsPlugin>(false);
            Hud.TogglePlugin<NotifyAtRiftPercentagePlugin>(true);
            Hud.TogglePlugin<NetworkLatencyPlugin>(false);
            Hud.TogglePlugin<GameInfoPlugin>(true);
            Hud.TogglePlugin<ExperienceOverBarPlugin>(false);
            Hud.TogglePlugin<DebugPlugin>(false);
            Hud.TogglePlugin<DamageBonusPlugin>(false);
            Hud.TogglePlugin<DangerousMonsterPlugin>(false);
			Hud.TogglePlugin<BountyTablePlugin>(true);
            Hud.TogglePlugin<SkillRangeHelperPlugin>(true);
            Hud.TogglePlugin<PlayerSkillPlugin>(true);
            Hud.TogglePlugin<OculusPlugin>(true);
            Hud.TogglePlugin<OtherPlayersPlugin>(true);
            Hud.TogglePlugin<MultiplayerExperienceRangePlugin>(false);
            Hud.TogglePlugin<HeadStonePlugin>(true);
            Hud.TogglePlugin<BannerPlugin>(false);
            Hud.TogglePlugin<PickupRangePlugin>(false);
            Hud.TogglePlugin<BloodShardPlugin>(false);
            Hud.TogglePlugin<InventoryFreeSpacePlugin>(false);
            Hud.TogglePlugin<InventoryKanaiCubedItemsPlugin>(true);
            Hud.TogglePlugin<InventoryMaterialCountPlugin>(true);
            Hud.TogglePlugin<StashPreviewPlugin>(false);
            Hud.TogglePlugin<StashUsedSpacePlugin>(false);
			Hud.TogglePlugin<TopExperienceStatistics>(false);
            Hud.TogglePlugin<MiniMapRightBuffListPlugin>(true);
            Hud.TogglePlugin<MiniMapLeftBuffListPlugin>(true);
            Hud.TogglePlugin<PlayerBottomBuffListPlugin>(true);
            Hud.TogglePlugin<ConventionOfElementsBuffListPlugin>(true);
            Hud.TogglePlugin<CheatDeathBuffFeederPlugin>(true);
            Hud.TogglePlugin<AttributeLabelListPlugin>(true);
            Hud.TogglePlugin<RackPlugin>(true);
            Hud.TogglePlugin<DeadBodyPlugin>(false);
            Hud.TogglePlugin<EliteMonsterAffixPlugin>(false);
			Hud.TogglePlugin<EliteMonsterSkillPlugin>(true);
            Hud.TogglePlugin<GroundLabelDecoratorPainterPlugin>(true);
            Hud.TogglePlugin<PlayerLeftBuffListPlugin>(true);
            Hud.TogglePlugin<PlayerRightBuffListPlugin>(true);
            Hud.TogglePlugin<PlayerTopBuffListPlugin>(true);
            Hud.TogglePlugin<TopLeftBuffListPlugin>(true);
            Hud.TogglePlugin<TopRightBuffListPlugin>(true);
			//   Hud.TogglePlugin<ClickableChestGizmoPlugin>(true);
		    Hud.GetPlugin<OriginalSkillBarPlugin>().SkillPainter.EnableSkillDpsBar = false;
		    Hud.GetPlugin<OriginalSkillBarPlugin>().SkillPainter.EnableDetailedDpsHint = false;
            Hud.GetPlugin<MarkerPlugin>().HealingWellDecorator.Enabled = false;
			
			//Hud.GetPlugin<MonstersCountPlugin>().ShowCursedCount = true;
            //Hud.GetPlugin<MonstersCountPlugin>().ShowKrysbinCount = true;
			//Hud.GetPlugin<MonstersCountPlugin>().ShowPainEnhancerCount = true;
            //Hud.GetPlugin<MonstersCountPlugin>().ShowEntanglingShotCount = true;
            
			Hud.GetPlugin<ItemsPlugin>().BookDecorator.Enabled = true;
		    Hud.GetPlugin<ItemsPlugin>().DeathsBreathDecorator.Enabled = true;
            Hud.GetPlugin<InventoryAndStashPlugin>().NotGoodDisplayEnabled = false;
		    Hud.GetPlugin<ItemsPlugin>().LegendaryDecorator.Enabled = true;
		    Hud.GetPlugin<ItemsPlugin>().SetDecorator.Enabled = true;
		    Hud.GetPlugin<ItemsPlugin>().UtilityDecorator.Enabled = false;
		    Hud.GetPlugin<ItemsPlugin>().NormalKeepDecorator.Enabled = false;
		    Hud.GetPlugin<ItemsPlugin>().MagicKeepDecorator.Enabled = false;
		    Hud.GetPlugin<ItemsPlugin>().RareKeepDecorator.Enabled = false;
		    Hud.GetPlugin<ItemsPlugin>().LegendaryKeepDecorator.Enabled = true;
            Hud.GetPlugin<ParagonCapturePlugin>().StopRenderingWhenCapturing = false;
            Hud.GetPlugin<ParagonCapturePlugin>().Enabled = false;  
                    
            // basic examples
			//Change pylon color
            /*Hud.RunOnPlugin<MarkerlabelPlugin>(plugin =>

            {
                plugin.UseCustomColors = true;
                plugin.ShrineDecorators[ShrineType.PowerPylon] = plugin.CreateDecorators(7f,255,255,0,0);
                plugin.ShrineDecorators[ShrineType.ConduitPylon] = plugin.CreateDecorators(7f,255,0,255,0);
                plugin.ShrineDecorators[ShrineType.BanditShrine] = plugin.CreateDecorators(7f,255,255,0,0);
                
			//Change Pylon Minimap Name Example
                plugin.ShrineCustomNames[ShrineType.PoolOfReflection] = "ÑÓÏ×ÈÊ";
            });*/
			
			//Change the font of ancient and primal items
			Hud.RunOnPlugin<InventoryAndStashPlugin>(plugin => 
			{ 
		     plugin.AncientRankFont = Hud.Render.CreateFont("arial", 7, 255, 0, 0, 0, true, false, 220, 227, 153, 25, true);
		     plugin.PrimalRankFont = Hud.Render.CreateFont("arial", 7, 255, 0, 0, 0, true, false, 180, 255, 64, 64, true);
	        }  );
            
			 Hud.RunOnPlugin<PlayerBottomBuffListPlugin>(plugin =>
	        {
			plugin.RuleCalculator.Rules.Add(new BuffRule(334883) { IconIndex = 1, MinimumIconCount = 1, ShowTimeLeft = true , UseLegendaryItemTexture = Hud.Inventory.GetSnoItem(Hud.Sno.SnoItems.Unique_Shoulder_103_x1.Sno)}); // Pauldrons of the Skeleton King	
		    //plugin.RuleCalculator.Rules.Add(new BuffRule(483552) { IconIndex = 5, MinimumIconCount = 1, ShowStacks = true }); // Squirt's Necklace
			//plugin.BuffPainter.ShowTimeLeftNumbers = true;
            //plugin.RuleCalculator.Rules.Add(new BuffRule(484289) { IconIndex = 10, MinimumIconCount = 1, ShowStacks = false, ShowTimeLeft = true, IconSizeMultiplier = 1.0f }); // Gears of Dreadland / 2pc: Momentum 20sec Cap
            //plugin.RuleCalculator.Rules.Add(new BuffRule(134030) { IconIndex = 8, MinimumIconCount = 1, ShowStacks = false, ShowTimeLeft = true, IconSizeMultiplier = 1.0f }); // Gears of Dreadland / 4pc: 60% DmgReduction, 5sec
				        
			});
            				
			// PersonalArcPlugin Configuration
	        Hud.RunOnPlugin<Extended.Addons.PersonalArcPlugin>(plugin =>
			{
	     		plugin.Enabled = true;

	     		plugin.HealthBar = false;
	     		plugin.ShieldBar = true;
			    plugin.ResourceBar = false;
			    plugin.Cooldowns = false;
			});
			 
			// Shrine Configuration
			Hud.RunOnPlugin<OtherShrinePlugin>(plugin =>
            {			
	        plugin.LabelHealingWells = "";		// Text on the minimap for HealingWells (null for namelocalized,"" for nothing)
	        plugin.LabelPoolOfReflection = "ÑÓÏ×ÈÊ";	// Text on the minimap for pools (null for namelocalized,"" for nothing)
	        plugin.LabelPossiblePylon = "Pylon?";	// Text for the labels of the places where possible pylons may appear
	        plugin.LabelPylonExchange = false;	// Exchange labels on map and mini map. If it is false they will always be shown      			
		
	        plugin.NotifyInTown = false;		// Enable or disable TTS/Popup in Town		
	        plugin.TTSViewPylon = true;		// Notify with voice (TTS) the Pylons and Sanctuaries
	        plugin.TTSBuffPylon = true;		// Notify with voice (TTS) When you receive a buff (and lose) from a pylon/Sanctuary
	        plugin.TTSViewPoolText = "supchik";	// Notify with voice (TTS) the pools of Reflection, will read the indicated text. Set to "" (or null) for not TTS 

            plugin.SquarePylon = false;		// Show Square Yellow/Gray on pylons/shrines
	        plugin.HiddenPylonUsed = true;		// Hide or show (in gray) decorators for used pylons
	        plugin.LineToPylon = true;		// Draw a yellow line on the minimap to the PoolOfReflection/Pylon/Sanctuary detected
	        plugin.LineToPylonWidth = 2f;		// Line width
	        plugin.LineToPylonRange = 500;		// Only draw the line if you are less than this distance

	        plugin.ShowPylonSpawn = true;		// Hide or not the decorators of the possible Pylons. In case someone uses another complement for it		
	        plugin.ShowPopup = true;		// Popup when you receive (or lose) a buff from a Pylon/Sanctuary
		
	        plugin.xPopup = 0.5f;		// 0f ... 1f  Popup Coordinate x
	        plugin.yPopup = 0.81f;		// 0f ... 1f  Popup Coordinate y
	        plugin.FontSizePopup = 9f;	// Size font for popup text

	        plugin.Opacity = 0.75f;		// 0f..1f opacity for all textures(of pylons/shrines/pools/wells, other markers) on the map when they're not on screen

	        plugin.ShowMarkers = true;	// Show markers other than Pylons/Shrines/Pools/Wells. Assign the value "false" if you want to use another plugin for this
	        plugin.LineToMarkerRange = 500; // Only draw the line if you are less than this distance
		    plugin.NemesisAlert = true;

            // If a pylon/sanc is not customized, default values: <Label Ground> = null, <Label Map> = null, <TTS view> = null, <TTS buff on> = "ShrineType Active", <TTS buff off> = "ShrineType Lost", <Popup buff> = "ShrineType"
			
            // Format: plugin.ConfigAdd( <type pylon or sanc> , <Label Ground>, <Label Map> , <TTS view>, <TTS buff on>, <TTS buff off>, <Popup buff> );
            // 	a)	<LabelGround> 	Text for Label (Ground),	"" for not label,	null for Namelocalized, 
            // 	a)	<Label Map> 	Text for Label (Map),		"" for not label,	null for Namelocalized, 
            //	c)	<TTS view>	Speak Text TTS,			"" for not TTS,		null for namelocalized, 
            // 	d)	<TTS buff on>	Speak Text TTS,			"" for not TTS,		null for not TTS, 
            // 	e)	<TTS buff off>	Speak Text TTS,			"" for not popup,	null for not TTS, 
            // 	f)	<Popup buff>	Popup Text,			"" for not Popup,	null for not popup,

	        plugin.Config(ShrineType.PowerPylon,"Ñèëà","ÑÈËÀ","Power","Active Power","Lost Power",null);
	        plugin.Config(ShrineType.ConduitPylon,"ÌÎËÍÈß","ÌÎËÍÈß","molniya", "Active molniya", "Lost molniya", null); //molniya // Conduit
	        plugin.Config(ShrineType.ChannelingPylon,"ÏÎÄÄÅÐÆÊÀ","ÏÎÄÄÅÐÆÊÀ","Channeling","Active Channeling","Lost Channeling",null);
	        plugin.Config(ShrineType.ShieldPylon,"ÇÀÙÈÒÀ","ÇÀÙÈÒÀ","Shield","Active Shield","Lost Shield",null); //zascheeta // Shield
	        plugin.Config(ShrineType.SpeedPylon,"ÑÊÎÐÎÑÒÜ","ÑÊÎÐÎÑÒÜ","Speed","Active Speed","Lost Speed",null); //skorost //Speed 
		
	        plugin.Config(ShrineType.BlessedShrine,null,"Ùèò",null,null,null,null);
	        plugin.Config(ShrineType.EnlightenedShrine,null,"Îáó÷åíèå",null,null,null,null);
	        plugin.Config(ShrineType.FortuneShrine,null,"Óäà÷à",null,null,null,null);
	        plugin.Config(ShrineType.FrenziedShrine,null,"Ãíåâ",null,"Active Frenzied","Lost Frenzied",null);
	        plugin.Config(ShrineType.EmpoweredShrine,null,"Óñèëåíèå",null,"Active Empowered","Lost Empowered",null);
	        plugin.Config(ShrineType.FleetingShrine,null,"Ñòðåìèòåëüíîñòü",null,"Active Fleeting","Lost Fleeting",null);
	        plugin.Config(ShrineType.BanditShrine,"ÁÀÍÄÈÒÛ","ÁÀÍÄÈÒÛ","BANDIT","ignored","ignored","ignored");	
			
			plugin.ModifyShrineDecorator(ShrineType.BanditShrine,6f,7f,255,255,0,0);  	// Type , SizeFont Ground , SizeFont Map, Opacity, Red, Green, Blue
	        plugin.ModifyShrineDecorator(ShrineType.PowerPylon,6f,7f,255,255,0,0);
	        plugin.ModifyShrineDecorator(ShrineType.ConduitPylon,6f,7f,255,0,255,0);
			plugin.ModifyShrineDecorator(ShrineType.SpeedPylon,6f,7f,255,0,255,200);
			plugin.ModifyShrineDecorator(ShrineType.ShieldPylon,6f,7f,255,255,255,0);
			plugin.ModifyShrineDecorator(ShrineType.ChannelingPylon,6f,7f,255,255,0,255);
			
            });
						 
			Hud.Sound.VolumeMode = VolumeMode.Constant;
            Hud.Sound.ConstantVolume = 15; // 0 .. 100
			           
         }

    }

}