import { createBrowserRouter } from 'react-router';
import RootLayout from './layouts/RootLayout';
import { routes } from './routes';
import { toRouteObjects } from './routes/utils';

const router = createBrowserRouter([
  {
    path: '/',
    element: <RootLayout />,
    children: toRouteObjects(routes),
  },
]);

export default router;
