// App.tsx or main routing component
//import React from 'react';
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import Layout from '@/components/layouts/Layout';
import LayoutLogin from '@/components/layouts/LayoutLogin';
import Vehicles from '@/components/pages/Vehicles';
import Login from '@/components/pages/Login';

const App = () => {
    return (
        <Router basename="/">
            <Routes>
                <Route path="/" element={<Navigate to="/login" replace />} />
                <Route
                    path="/vehicles"
                    element={
                        <Layout>
                            <Vehicles />
                        </Layout>
                    }
                />
                <Route
                    path="/login"
                    element={
                        <LayoutLogin>
                            <Login />
                        </LayoutLogin>
                    }
                />
            </Routes>
        </Router>
    );
};

export default App;
