// src/App.tsx
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import HomeLayout from "./layout/Home";
import DashboardLayout from "./layout/Dashboard";

import Home from "./pages/Home/Home";
import Dashboard from "./pages/Dashboard";

import PrivateRoute from "./routes/Privateroute";
//import LoginPage from "./pages/LoginPage";
//import UsersPage from "./pages/UsersPage";
//import OrdersPage from "./pages/OrdersPage";

function App() {
  return (
    <Router>
      <Routes>
        {/* Public route */}
        {/*<Route path="/login" element={<LoginPage />} />*/}

        {/* Dashboard routes with layout */}
        <Route path="/" element={<HomeLayout />}>
          <Route index element={<Home />} />
          <Route path="home/" element={<Home />} />
        </Route>

        {/* Private routes */}
        <Route element={<PrivateRoute />}>
          <Route path="/dashboard" element={<DashboardLayout />}>
            <Route index element={<Dashboard />} />
          </Route>
        </Route>
      </Routes>
    </Router>
  );
}

export default App;
