package net.eaglerforge.gui;

import org.teavm.jso.JSBody;

public class ModGUI {
    @JSBody(params = {}, script = "displayGui();")
    public static native void displayGui();

    @JSBody(params = {}, script = "var font = document.createElement(\"style\");\r\n" + //
            "console.log('Loaded font!');\r\n" + //
            "font.innerHTML = \"@font-face { font-family: Minecraftia; src: url(data:font/truetype;base64,[encoded data, 24316 characters]); }\";\r\n" + //
            "document.head.appendChild(font);")
    public static native void loadFont();

    @JSBody(params = {}, script = "if (document.querySelector(\"#eaglerml_gui\")) {\r\n" + //
            "    document.querySelector(\"#eaglerml_gui\").remove();\r\n" + //
            "  }")
    public static native void closeGui();

    @JSBody(params = {}, script = "return !!document.querySelector(\"#eaglerml_gui\")")
    public static native boolean isGuiOpen();

    @JSBody(params = {}, script = "console.log('closed a screen')")
    public static native void qlog();
}