import { Navigate } from 'react-router-dom';

import Layout from '@/layouts/BasicLayout';
import Forbidden from '@/pages/error/403';
import NotFound from '@/pages/error/404';
import ServerError from '@/pages/error/500';
import Home from '@/pages/home';
// import RouteDemo from '@/pages/routeDemo';
// import FeatureDemo from '@/pages/featureDemo';
import Pricing from '@/pages/pricing';
import PrivacyPolicy from '@/pages/privacyPolicy';
import Redirect from '@/pages/redirect';
import TermsOfService from '@/pages/termsOfService';

import type { AppRouteObject } from './types';

const routes: AppRouteObject[] = [
    {
        path: '/',
        element: <Layout />,
        children: [
            {
                index: true,
                element: <Navigate to="/home" replace />,
            },
            {
                name: 'home',
                path: '/home',
                element: <Home />,
            },
            {
                name: 'pricing',
                path: '/pricing',
                element: <Pricing />,
            },
            {
                name: 'privacyPolicy',
                path: '/privacy',
                element: <PrivacyPolicy />,
            },
            {
                name: 'termsOfService',
                path: '/terms-of-service',
                element: <TermsOfService />,
            },
            // {
            //     name: 'featureDemo',
            //     path: '/feature-demo',
            //     element: <FeatureDemo />,
            // },
            // {
            //     name: 'routeDemo',
            //     path: '/route-demo/:id?',
            //     element: <RouteDemo />,
            // },
            // {
            //     name: 'test',
            //     path: '/test',
            //     hideInMenu: true,
            //     children: [
            //         {
            //             name: 'test1',
            //             path: '/test/test1',
            //             element: <div className="text-white">test1</div>,
            //         },
            //         {
            //             name: 'test2',
            //             path: '/test/test2',
            //             element: <div className="text-white">test2</div>,
            //         },
            //     ],
            // },
        ],
    },
    {
        name: 'to',
        path: '/to',
        hideInMenu: true,
        element: <Redirect />,
    },
    {
        name: '403',
        path: '/403',
        element: <Forbidden />,
        hideInMenu: true,
    },
    {
        name: '500',
        path: '/500',
        element: <ServerError />,
        hideInMenu: true,
    },
    {
        name: '404',
        path: '*',
        element: <NotFound />,
        hideInMenu: true,
    },
] as AppRouteObject[];

export default routes;
