import ReactDOM from 'react-dom/client';
import './index.css';
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
import { MainPage } from './pages/MainPage';
import { Layout } from './components/Layouts/Layout';
import CookiesPage from './pages/CookiesPage';
import PolicyPage from './pages/PolicyPage';
import PrivacyPolicyPage from './pages/PrivacyPolicyPage';

ReactDOM.createRoot(document.getElementById('root')!).render(
  <RouterProvider
    router={createBrowserRouter([
      {
        path: '/',
        Component: Layout,
        children: [
          {
            index: true,
            Component: MainPage,
          },
          {
            path: '/cookies',
            Component: CookiesPage,
          },
          {
            path: '/policy',
            Component: PolicyPage,
          },
          {
            path: '/privacy-policy',
            Component: PrivacyPolicyPage,
          },
        ],
      },
    ])}
  />,
);
