import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { BrowserRouter, Route, Routes } from "react-router";
import './css/index.css'
import App from './App.jsx'
import Login from "./Login.jsx"
import Profile from "./Profile.jsx"
import Cookies from "js-cookie"
import Search from './Search.jsx';

// helper shit
export const config = {
  "serverURL": "http://localhost:8080"
}

export function signedIn() {
  return Cookies.get("token") && Cookies.get("token").startsWith("HajeebToken");
}

createRoot(document.getElementById('root')).render(
  <BrowserRouter>
    <Routes>
      <Route path="/" element={<App />} />
      <Route path="/login" element={<Login />} />
      <Route path="/profile" element={<Profile />} />
      <Route path="/search" element={<Search />} />
    </Routes>
  </BrowserRouter>
)
