import {BrowserRouter, Routes, Route} from "react-router-dom";

import Login from "@/pages/Login";
import Dashboard from "@/pages/Dashboard";
import Blog from "@/pages/Blog";
import Department from "@/pages/Department";

import ProtectedRoute from "./components/ProtectedRoutes/ProtectedRoutes";

export default function App() {
	return (
		<BrowserRouter>
			<Routes>
				<Route path="/" element={<Login />} />

				<Route
					path="/dashboard"
					element={
						<ProtectedRoute>
							<Dashboard />
						</ProtectedRoute>
					}
				/>

				<Route
					path="/blog"
					element={
						<ProtectedRoute>
							<Blog />
						</ProtectedRoute>
					}
				/>

				<Route
					path="/department"
					element={
						<ProtectedRoute>
							<Department />
						</ProtectedRoute>
					}
				/>
			</Routes>
		</BrowserRouter>
	);
}
