package de.winniepat.citrus.client;

import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import org.lwjgl.glfw.GLFW;

public class ClientKeybinds {

    private static final String CATEGORY = "category.citrus.general";

    public static KeyBinding OPEN_DRAGGUI;
    public static KeyBinding OPEN_CAPE_SCREEN;
    public static KeyBinding REFRESH_CLIENT;
    public static KeyBinding TOGGLE_FULLBRIGHT;
    public static KeyBinding ZOOM_KEY;
    public static KeyBinding OPEN_MODULETOGGLE;
    public static KeyBinding OPEN_FRIENDS_SCREEN;
    public static KeyBinding OPEN_COSMETICS_SCREEN;

    public static KeyBinding OPEN_BETA_KEY_SCREEN;

    public static void register() {
        OPEN_DRAGGUI = new KeyBinding("key.citrus.overlay_editor", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_RIGHT_SHIFT, CATEGORY);
        OPEN_CAPE_SCREEN = new KeyBinding("key.citrus.open_cape_screen", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_K, CATEGORY);
        REFRESH_CLIENT = new KeyBinding("key.citrus.refresh_client", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_J, CATEGORY);
        TOGGLE_FULLBRIGHT = new KeyBinding("key.citrus.toggle_fullbright", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_G, CATEGORY);
        ZOOM_KEY = new KeyBinding("key.citrus.zoom", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_C, CATEGORY);
        OPEN_MODULETOGGLE = new KeyBinding("key.citrus.module_toggle", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_RIGHT_ALT, CATEGORY);
        OPEN_FRIENDS_SCREEN = new KeyBinding("key.citrus.open_friends_screen", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_H, CATEGORY);
        OPEN_COSMETICS_SCREEN = new KeyBinding("key.citrus.open_cosmetics_screen", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_L, CATEGORY);
        OPEN_BETA_KEY_SCREEN = new KeyBinding("key.citrus.open_beta_key_screen", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_B, CATEGORY);

        KeyBindingHelper.registerKeyBinding(OPEN_DRAGGUI);
        KeyBindingHelper.registerKeyBinding(OPEN_CAPE_SCREEN);
        KeyBindingHelper.registerKeyBinding(REFRESH_CLIENT);
        KeyBindingHelper.registerKeyBinding(TOGGLE_FULLBRIGHT);
        KeyBindingHelper.registerKeyBinding(ZOOM_KEY);
        KeyBindingHelper.registerKeyBinding(OPEN_MODULETOGGLE);
        KeyBindingHelper.registerKeyBinding(OPEN_FRIENDS_SCREEN);
        KeyBindingHelper.registerKeyBinding(OPEN_COSMETICS_SCREEN);
        KeyBindingHelper.registerKeyBinding(OPEN_BETA_KEY_SCREEN);
    }
}
