import { lazy } from 'react';

// project import
import Loadable from 'components/Loadable';
// import MainLayout from 'layout/MainLayout';
const MainLayout = Loadable(lazy(() => import('layout/MainLayout')));

// render - dashboard
const DashboardDefault = Loadable(lazy(() => import('pages/Dashboard/GLD')));
const ApplicationDetail = Loadable(lazy(() => import('pages/PublicNotice/Details_GLD')));
const ApplicationSearch = Loadable(lazy(() => import('pages/PublicNotice/Search_GLD')));
const ProofSearch = Loadable(lazy(() => import('pages/Proof/Search_GLD')));
const ProofCreate_FromApp = Loadable(lazy(() => import('pages/Proof/Create_FromApp')));
const ProofReply_GLD = Loadable(lazy(() => import('pages/Proof/Reply_GLD')));
const PaymentSearch_GLD = Loadable(lazy(() => import('pages/Payment/Search_GLD')));
const PaymentDetails_GLD = Loadable(lazy(() => import('pages/Payment/Details_GLD')));
const DemandNote_Create = Loadable(lazy(() => import('pages/DemandNote/Create')));
const DemandNote_Search = Loadable(lazy(() => import('pages/DemandNote/Search')));
const DemandNote_Details = Loadable(lazy(() => import('pages/DemandNote/Details')));
const GFMIS_Search = Loadable(lazy(() => import('pages/GFMIS')));
const UserMaintainPage = Loadable(lazy(() => import('pages/User/GLDUserProfile')));
const SystemSetting = Loadable(lazy(() => import('pages/Setting/SystemSetting')));
const AnnouncementDetails = Loadable(lazy(() => import('pages/Announcement/Details')));
const AnnouncementSearch = Loadable(lazy(() => import('pages/Announcement/Search')));

// ==============================|| MAIN ROUTING ||============================== //

const GLDUserRoutes = {
  path: '/',
  element: <MainLayout />,
  children: [
    {
      path: '/',
      element: <DashboardDefault />
    },
    {
      path: '/',
      children: [
        {
          path: 'dashboard',
          element: <DashboardDefault />
        },
        {
          path: '/application/:id',
          element: <ApplicationDetail/>
        },
        {
          path: '/application/search',
          element: <ApplicationSearch/>
        },
        {
          path: '/proof/search',
          element: <ProofSearch/>
        },
        {
          path: '/proof/create/:id',
          element: <ProofCreate_FromApp/>
        },
        {
          path: '/proof/reply/:id',
          element: <ProofReply_GLD/>
        },
        {
          path: '/paymentPage/search',
          element: <PaymentSearch_GLD/>
        },
        {
          path: '/paymentPage/details/:id',
          element: <PaymentDetails_GLD/>
        },
        {
          path: '/paymentPage/createDemandNote',
          element: <DemandNote_Create/>
        },
        {
          path: '/paymentPage/demandNote',
          element: <DemandNote_Search/>
        },
        {
          path: '/paymentPage/demandNote/details/:id',
          element: <DemandNote_Details/>
        },
        {
          path: '/gfmis/search',
          element: <GFMIS_Search/>
        },
        {
          path: '/user/profile',
          element: <UserMaintainPage />
        },
        {
          path: '/setting/sys',
          element: <SystemSetting />
        },
        {
          path: '/setting/announcement',
          element: <AnnouncementSearch />
        },
        {
          path: '/setting/announcement/details/:id',
          element: <AnnouncementDetails />
        },
      ]
    },
  ]
};

export default GLDUserRoutes;
