import { Server } from "http";
import { atom } from "jotai";

// store which page the user is currently on
// no actual routing is done here,
// full page components are used render the different pages
// TODO: incomplete, to be updated as more pages are added
// TODO: also remove testing when done
export type Routes = "home" | "sql_injection" | "xss" | "cmd_injection" | "testing";
export const routeAtom = atom<Routes>("home");

// store the status of connection to backend
type ServerConnection = "connected" | "connecting" | "disconnected";
export const serverConnectionAtom = atom<ServerConnection>("disconnected");

// store the url of the backend server
export const serverUrlAtom = atom("");
