import { lazy } from 'react';

// project import
import Loadable from 'components/Loadable';
// import MainLayout from "../layout/MainLayout";
const MainLayout = Loadable(lazy(() => import('layout/MainLayout')));
// import {Navigate} from "react-router";

// render - login
const SettingPage = Loadable(lazy(() => import('pages/pnspsSettingPage')));
const PasswordPolicyPage = Loadable(lazy(()=> import('pages/pnspsPasswordPolicyPage')))
const UserSearchPage = Loadable(lazy(()=>import ('pages/User/SearchPage')));
const UserMaintainPage = Loadable(lazy(() => import('pages/User/DetailPage')));
const UserSearchPage_Individual= Loadable(lazy(()=>import ('pages/User/SearchPage_Individual')));
const UserMaintainPage_Individual = Loadable(lazy(() => import('pages/User/DetailsPage_Individual')));
const UserSearchPage_Organization= Loadable(lazy(()=>import ('pages/User/SearchPage_Organization')));
const UserMaintainPage_Organization = Loadable(lazy(() => import('pages/User/DetailsPage_Organization')));
const UserGroupSearchPage = Loadable(lazy(() => import('pages/pnspsUserGroupSearchPage')));
const UserGroupDetailPage = Loadable(lazy(() => import('pages/pnspsUserGroupDetailPage')));
const OrganizationSearchPage = Loadable(lazy(() => import('pages/Organization/SearchPage')));
const OrganizationDetailPage = Loadable(lazy(() => import('pages/Organization/DetailPage')));
const OrganizationDetailPage_fromUser = Loadable(lazy(() => import('pages/Organization/DetailPage_FromUser')));
const EmailTemplatePage = Loadable(lazy(() => import('pages/EmailTemplate/Search_GLD')));
const EmailTemplateDetailPage = Loadable(lazy(() => import('pages/EmailTemplate/Detail_GLD')));


// ==============================|| AUTH ROUTING ||============================== //

const SettingRoutes = {
    path: '/',
    element: <MainLayout />,
    children: [
        {
          path: 'usergroupSearchview',
          element: <UserGroupSearchPage />
        },
        {
            path: '/userGroup/:id',
            element: <UserGroupDetailPage />
        },
        {
            path: 'userSearchview',
            element: <UserSearchPage />
        },
        {
            path: '/user/:id',
            element: <UserMaintainPage />
        },
        {
            path: 'indUser',
            element: <UserSearchPage_Individual />
        },
        {
            path: '/indUser/:id',
            element: <UserMaintainPage_Individual />
        },
        {
            path: 'orgUser',
            element: <UserSearchPage_Organization />
        },
        {
            path: '/orgUser/:id',
            element: <UserMaintainPage_Organization />
        },
        {
            path: 'org',
            element: <OrganizationSearchPage />
        },
        {
            path: '/org/:id',
            element: <OrganizationDetailPage />
        },
        {
            path: '/org/fromUser/:id',
            element: <OrganizationDetailPage_fromUser />
        },
        {
            path: 'setting',
            element: <SettingPage />
        },
        {
            path: 'passwordpolicy',
            element: <PasswordPolicyPage />
        },
        {
            path: 'emailTemplate',
            element: <EmailTemplatePage/>
        },
        {
            path: '/emailTemplate/:id',
            element: <EmailTemplateDetailPage/>
        },
    ]
};

export default SettingRoutes;
