import React from "react";
import ReactDOM from "react-dom/client";
import { BrowserRouter } from "react-router-dom";

import { AppRouter } from "./router";
import { AuthProvider } from "./state/auth";
import { SessionsProvider } from "./state/sessions";
import "./styles/tokens.css";
import "./styles/global.css";
import "./styles/utilities.css";
import "./styles/syntax-highlight.css";
import "./styles/pages/git-history.css";

import "./styles/pages/projects.css";
import "./styles/pages/sessions.css";
import "./styles/pages/ssh-keys.css";
import "./styles/pages/workspace-detail.css";
import "./styles/pages/workspaces.css";

ReactDOM.createRoot(document.getElementById("root")!).render(
	<React.StrictMode>
		<BrowserRouter>
			<AuthProvider>
				<SessionsProvider>
					<AppRouter />
				</SessionsProvider>
			</AuthProvider>
		</BrowserRouter>
	</React.StrictMode>,
);
