// This program has been developed by students from the bachelor Computer Science at Utrecht
// University within the Software Project course.
// © Copyright Utrecht University (Department of Information and Computing Sciences)
import { Routes, Route, Link } from 'react-router'
import './App.css'
import Home from './pages/Home/Home.tsx'
import UserManual from './pages/Manuals/Manuals.tsx';
import VisProg from "./pages/VisProgPage/VisProg.tsx";
import {useState} from "react";
import Logging from "./components/Logging/Logging.tsx";
import styles from "./App.module.css";


function App(){
  const [showLogs, setShowLogs] = useState(false);

  return (
    <>
      <header className={styles.header}>
        <div><span>© Utrecht University (ICS)</span></div>
        <div><Link to={"/"}>Home</Link></div>
        <div><button onClick={() => setShowLogs(!showLogs)}>Developer Logs</button></div>
      </header>
      <div className={"flex-row justify-center flex-1 min-height-0"}>
        <main className={"flex-col align-center flex-1 scroll-y"}>
          <Routes>
            <Route path="/" element={<Home />} />
            <Route path="/editor" element={<VisProg />} />
            <Route path="/user_manual" element={<UserManual />} />
        </Routes>
        </main>
        {showLogs && <Logging />}
      </div>
    </>
  );
}

export default App
