import { lazy } from 'react';

// project import
import Loadable from 'components/Loadable';
// import MainLayout from 'layout/MainLayout';
const MainLayout = Loadable(lazy(() => import('layout/MainLayout')));
// import { isPasswordExpiry } from "utils/Utils";

// render - dashboard
const DashboardDefault = Loadable(lazy(() => import('pages/Dashboard/Public')));
const ManageOrgUser = Loadable(lazy(() => import('pages/User/ManagePage_OrgPublic')));
const PublicNotice = Loadable(lazy(() => import('pages/PublicNotice/ListPanel')));
const PublicNoticeApplyForm = Loadable(lazy(() => import('pages/PublicNotice/ApplyForm')));
const PublicNoticeDetail = Loadable(lazy(() => import('pages/PublicNotice/Details_Public')));
const ProofReply = Loadable(lazy(() => import('pages/Proof/Reply_Public')));
const ProofSearch = Loadable(lazy(() => import('pages/Proof/Search_Public')));
const ProofPayment = Loadable(lazy(() => import('pages/Proof/Payment')));
const Payment_Multi = Loadable(lazy(() => import('pages/Payment')));
const Payment_FPS = Loadable(lazy(() => import('pages/Payment/FPS')));
const Payment_FPS_CallBack = Loadable(lazy(() => import('pages/Payment/FPS/fpscallback')));
const Payment_FPS_Ackpage = Loadable(lazy(() => import('pages/Payment/FPS/AckPage')));
const Payment_Card = Loadable(lazy(() => import('pages/Payment/Card')));
const Payment_Callback = Loadable(lazy(() => import('pages/Payment/PaymentCallback')));
const PaymentSearch_Public = Loadable(lazy(() => import('pages/Payment/Search_Public')));
const PaymentDetails_Public = Loadable(lazy(() => import('pages/Payment/Details_Public')));
const DemandNote_Public = Loadable(lazy(() => import('pages/DemandNote/Search_Public')));
const UserMaintainPage_Individual = Loadable(lazy(() => import('pages/User/DetailsPage_Individual')));
const UserMaintainPage_Organization = Loadable(lazy(() => import('pages/User/DetailsPage_Organization')));
const OrganizationDetailPage = Loadable(lazy(() => import('pages/Organization/DetailPage')));
const Msg_Details = Loadable(lazy(() => import('pages/Message/Details')));
const Msg_Search = Loadable(lazy(() => import('pages/Message/Search')));
const AnnouncementSearch = Loadable(lazy(() => import('pages/Announcement/Search_Public')));
const IAmSmart_SuccessCallback = Loadable(lazy(() => import('pages/iAmSmart/SuccessCallback')));
const ChangePasswordPage = Loadable(lazy(() => import('pages/User/ChangePasswordPage')));

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

const PublicDashboard = {
  path: '/',
  element: <MainLayout />,
  children: [
    {
      path: '/',
      element: <DashboardDefault />
    },
    {
      path: '/',
      children: [
        {
          path: 'dashboard',
          element: <DashboardDefault />
        },
        {
          path: 'iamsmart/loginSucess',
          element: <IAmSmart_SuccessCallback/>
        },
        {
          path: 'setting/manageUser',
          element: <ManageOrgUser />
        },
        {
          path: 'publicNotice',
          element: <PublicNotice />
        },
        {
          path: 'publicNotice/apply',
          element: <PublicNoticeApplyForm />
        },
        {
          path: 'publicNotice/:id',
          element: <PublicNoticeDetail />
        },
        {
          path: 'proof/reply/:id',
          element: <ProofReply />
        },
        {
          path: 'proof/search',
          element: <ProofSearch />
        },
        {
          path: 'proof/pay/:id',
          element: <ProofPayment />
        },
        {
          path: 'paymentPage',
          element: <Payment_Multi />
        },
        {
          path: 'paymentPage/fps',
          element: <Payment_FPS />
        },
        {
          path: 'paymentPage/card',
          element: <Payment_Card />
        },
        {
          path: 'paymentPage/callback',
          element: <Payment_Callback />
        },
        {
          path: 'paymentPage/fps/fpscallback',
          element: <Payment_FPS_CallBack />
        },
        {
          path: 'paymentPage/fps/ackpage',
          element: <Payment_FPS_Ackpage />
        },
        {
          path: 'paymentPage/search',
          element: <PaymentSearch_Public />
        },
        {
          path: 'paymentPage/details/:id',
          element: <PaymentDetails_Public />
        },
        {
          path: 'paymentPage/demandNote',
          element: <DemandNote_Public />
        },
        {
          path: '/indUser',
          element: <UserMaintainPage_Individual />
        },
        {
          path: '/orgUser',
          element: <UserMaintainPage_Organization />
        },
        {
          path: '/org',
          element: <OrganizationDetailPage />
        },
        {
          path: '/msg/details/:id',
          element: <Msg_Details />
        },
        {
          path: '/msg/search',
          element: <Msg_Search />
        },
        {
          path: '/announcement/search',
          element: <AnnouncementSearch />
        },
        {
          path: '/user/changePassword',
          element: <ChangePasswordPage />
        }
      ]
    }
    
  ]
};

export default PublicDashboard;
