import { createBrowserRouter, Navigate, Outlet } from 'react-router-dom';
import {
Login,
VerifyEmail,
Registration,
ResetPassword,
ApiErrorWatcher,
TwoFactorScreen,
RequestPasswordReset,
} from '~/components/Auth';
import AgentMarketplace from '~/components/Agents/Marketplace';
import { OAuthSuccess, OAuthError } from '~/components/OAuth';
import { AuthContextProvider } from '~/hooks/AuthContext';
import RouteErrorBoundary from './RouteErrorBoundary';
import StartupLayout from './Layouts/Startup';
import LoginLayout from './Layouts/Login';
import dashboardRoutes from './Dashboard';
import ShareRoute from './ShareRoute';
import ChatRoute from './ChatRoute';
import Search from './Search';
import Root from './Root';
const AuthLayout = () => (
);
export const router = createBrowserRouter([
{
path: 'share/:shareId',
element: ,
errorElement: ,
},
{
path: 'oauth',
errorElement: ,
children: [
{
path: 'success',
element: ,
},
{
path: 'error',
element: ,
},
],
},
{
path: '/',
element: ,
errorElement: ,
children: [
{
path: 'register',
element: ,
},
{
path: 'forgot-password',
element: ,
},
{
path: 'reset-password',
element: ,
},
],
},
{
path: 'verify',
element: ,
errorElement: ,
},
{
element: ,
errorElement: ,
children: [
{
path: '/',
element: ,
children: [
{
path: 'login',
element: ,
},
{
path: 'login/2fa',
element: ,
},
],
},
dashboardRoutes,
{
path: '/',
element: ,
children: [
{
index: true,
element: ,
},
{
path: 'c/:conversationId?',
element: ,
},
{
path: 'search',
element: ,
},
{
path: 'agents',
element: ,
},
{
path: 'agents/:category',
element: ,
},
],
},
],
},
]);