import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import Layout from './components/layout/Layout';
import HomePage from './pages/HomePage';
import Lesson1Page from './pages/Lesson1Page';
import Lesson2Page from './pages/Lesson2Page';
import Lesson3Page from './pages/Lesson3Page';
import Lesson4Page from './pages/Lesson4Page';
import './index.css';

const router = createBrowserRouter([
  {
    path: '/',
    element: <Layout />,
    children: [
      {
        index: true,
        element: <HomePage />,
      },
      {
        path: 'lesson1',
        element: <Lesson1Page />,
      },
      {
        path: 'lesson2',
        element: <Lesson2Page />,
      },
      {
        path: 'lesson3',
        element: <Lesson3Page />,
      },
      {
        path: 'lesson4',
        element: <Lesson4Page />,
      },
    ],
  },
]);

function App() {
  return <RouterProvider router={router} />;
}

export default App;
