#ifndef __G_CONSOLE_H__
#define __G_CONSOLE_H__

#define G_CONSOLE_MAX_LEN 512
#define G_CONSOLE_BUFFER_SIZE G_CONSOLE_MAX_LEN * 64

#include <gear/base.h>
#include <gear/ui/gui.h>
#include <log.c/log.h>

typedef g_buffer(char, G_CONSOLE_BUFFER_SIZE) g_console_buffer;

typedef struct g_console {
    g_console_buffer input;
    g_console_buffer output;
    void (*log_callback)(log_Event* event);
} g_console;

// src/ui/console/create.c
g_gui_layer* g_console_create();

// src/ui/console/draw.c
void g_console_draw(g_gui_context* ctx, g_gui_layer* console);

// src/ui/console/destroy.c
void g_console_destroy(void* console);

#endif
