#pragma once
#include <functional>
#include <iostream>

#include "Texture.h"
#include "../TextureManager.h"

class Button
{
public:
	Button() = default;
	Button(const std::string& filePath, Vector2f pos, Vector2f size, TextureManager* manager);
	~Button();
	void Draw() const;
	void Update(float elapsedSec);

	void SetOnClick(std::function<void(void)> onClick) {
		m_OnClick = onClick;
	}
	
private:
	Texture* m_Texture{ nullptr };
	Vector2f m_Position;
	Vector2f m_Size;

	bool m_IsHovered{ false };
	bool m_IsPressed{ false };
	bool m_IsPrimed{ false };

	std::function<void(void)> m_OnClick{ []() { std::cout << "Button not implemented" << std::endl; } };	
};
