#? replace(sub = "\t", by = " ")
import dom

const index 		 = staticRead("../page/home.html")
const predseda 		 = staticRead("../page/predseda.html")
const prebiram 		 = staticRead("../page/prebiram.html")
const zapojit_se 	 = staticRead("../page/zapojit_se.html")
const zalozit_spolek = staticRead("../page/zalozit_spolek.html")

proc get_routes(url: cstring) {.export_c.} =
	var new_url = ""

	for c in url:
		echo c
		new_url.add(c)

	echo new_url
	
	document.querySelector("#root").innerHTML = case new_url
		of "#/predseda": 	   predseda
		of "#/prebiram": 	   prebiram
		of "#/zapojit-se": 	   zapojit_se
		of "#/zalozit-spolek": zalozit_spolek
		else: predseda


