#pragma once
#include <utility>
#include <vector>

#include "../gr.h"
#include "../aud.h"
#include "../net.h"
#include<tiny/term.h>

	namespace enginend {
		struct theme;
		
		namespace nodes {
			struct node{
				enginend::theme*theme{};
				
				virtual void    boot()=0;
				virtual void    tick()=0;
				virtual void    draw()=0;
				virtual void    exit()=0;
			};
		}
		struct group : public virtual enginend::nodes::node {
			std::vector<node*> children;

			explicit group(std::vector<enginend::nodes::node *> nodes):children(std::move(nodes)){};

			void boot() override {for (node* n: children){n->boot();}}
			void tick() override {for (node* n: children){n->tick();}}
			void draw() override {for (node* n: children){n->draw();}}
			void exit() override {for (node* n: children){n->exit();}}
		};
		
		struct theme {
			Color booleanbutton[6],button[3],booleantext[6],buttontext[3],text,buttonborder[3],booleanborder[6],border,background
			,textfieldbg
			;

			Font font;

			Image slider,handle, checkbox,checkboxchecked;

			Color tint;
		};
		extern enginend::theme* DEFAULT;
		
		
	}
