#pragma once

namespace kek {

struct ActiveKeyboardCapture {
	KeyboardCapture id = KEK_INVALID_ID;
	KeyCharCallback charCallback;
	KeyCallback keyCallback;
	Callable uncaptureCallback;
};

struct InputData {
	std::map<InputListener, PeriodicCallback> periodicCallbacks;
	std::map<InputListener, KeyCallback> keyCallbacks;
	std::map<InputListener, KeyCharCallback> keyCharCallbacks;
	std::map<InputListener, MouseCallback> mouseCallbacks;
	std::map<InputListener, MouseButtonCallback> mouseButtonCallbacks;
	std::map<KeyBinding, KeyBindingData> keyBindings;

	ActiveKeyboardCapture activeKeyboardCapture;
	GLFWCursorMode cursorMode;
};

namespace Input {

void onCursorPosCallback(GLFWwindow *window, double x, double y);
void onKeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods);
void onKeyCharCallback(GLFWwindow *window, unsigned int codepoint);
void onMouseButtonCallback(GLFWwindow* window, int button, int action, int mods);

}

}