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

import Login from "./pages/Login";
import Dashboard from "./pages/Dashboard";
import Employee from "./pages/Employee";
import Department from "./pages/Department";
import Salary from "./pages/Salary";
import PrivateRoute from "./PrivateRoute"; // ✅ import

function App() {
  return (
    <BrowserRouter>
      <Routes>

        <Route path="/" element={<Login />} />

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

        <Route path="/employee"
          element={<PrivateRoute><Employee /></PrivateRoute>}
        />

        <Route path="/department"
          element={<PrivateRoute><Department /></PrivateRoute>}
        />

        <Route path="/salary"
          element={<PrivateRoute><Salary /></PrivateRoute>}
        />

      </Routes>
    </BrowserRouter>
  );
}

export default App;