/**
 * initializes the system
 */
async function main
(
): Promise<void>
{
	const conf: type_conf = await fetch("conf.json").then<type_conf>(x => x.json());
	const model: type_model =
	{
		"state": enum_state.offline,
		"connection_id": null,
		"nickname": null,
		"channels": {},
		"queries": {},
		"active": null,
		"listeners": {},
	};
	ns_model.setup(conf, model);
	ns_view.setup(conf, model);
	ns_control.setup(conf, model);
}


document.addEventListener("DOMContentLoaded", () => {main();});