import { lazy } from 'react';

// project import
import Loadable from 'components/Loadable';
import MainLayout from "../layout/MainLayout";

// render - login
const SettingPage = Loadable(lazy(() => import('pages/pnspsSettingPage')));
const PasswordPolicyPage = Loadable(lazy(()=> import('pages/pnspsPasswordPolicyPage')))
const UserSearchPage = Loadable(lazy(()=>import ('pages/pnspsUserSearchPage')));
const UserMaintainPage = Loadable(lazy(() => import('pages/pnspsUserDetailPage')));
const UserSearchPage_Individual= Loadable(lazy(()=>import ('pages/pnspsUserSearchPage_Individual')));
const UserMaintainPage_Individual = Loadable(lazy(() => import('pages/pnspsUserDetailPage_Individual')));
const UserSearchPage_Organization= Loadable(lazy(()=>import ('pages/pnspsUserSearchPage_Organization')));
const UserMaintainPage_Organization = Loadable(lazy(() => import('pages/pnspsUserDetailPage_Organization')));
const UserGroupSearchPage = Loadable(lazy(() => import('pages/pnspsUserGroupSearchPage')));
const UserGroupDetailPage = Loadable(lazy(() => import('pages/pnspsUserGroupDetailPage')));
const OrganizationSearchPage = Loadable(lazy(() => import('pages/OrganizationSearchPage')));
const OrganizationDetailPage = Loadable(lazy(() => import('pages/OrganizationDetailPage')));
const OrganizationDetailPage_fromUser = Loadable(lazy(() => import('pages/OrganizationDetailPage/index_loadFormUser')));


// ==============================|| 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 />
        },
    ]
};

export default SettingRoutes;
