#pragma once
#include "Mod.h"

#include "Client.h"

class TargetInfo : public Mod {
public:
	int style = 1;
	float blurs = 5.f;
	float opacity = 0.4f;
	bool bold = false;
	TargetInfo() : Mod(_("Target Info"), _("Display enemy's info."), Category::RENDER) {
		settings.push_back(new Setting{ _("Style"), &style, new int(2), new int(0), 1, {
			_("Old"),
			_("Packet"),
			_("Simple")
			}, true});
		settings.push_back(new Setting{ _("Opacity"), &opacity, new float(1.f), new float(0.f), 2, {}, true });
		settings.push_back(new Setting{ _("Blurs"), &blurs, new float(10.f), new float(0.f), 2, {}, true, 10.f });
		settings.push_back(new Setting{ _("Bold"), &bold, 0, 0, 0, {}, true });

		pos = ImVec2(Client::windowsize.x / 2 + 300.f, Client::windowsize.y / 2 + 100.f);
		
		enabled = false;
	}

	ImVec2 pos = ImVec2();
	float nowwidth = 0.f;

	struct PlayerInfo {
		std::string name;
		float health;
		float absorption;
	};
	PlayerInfo lastplayer;
private:
	long long lasthit = 0;
	std::vector<Player*> list;

	ID3D11ShaderResourceView* getActorSkinTexture(Actor* actor);

	virtual auto onAttack(Actor& actor) -> void override;
	virtual auto onImGuiRender() -> void override;
	virtual auto onClient() -> void override;
};
