<?php

use CodeIgniter\Router\RouteCollection;

/**
 * @var RouteCollection $routes
 */
// $routes->match(['get', 'post'], '/', 'Home::index');
$routes->match(['get', 'post'], '/', 'authentication\AuthenticationController::login');
$routes->group('backdesk',function($routes){
    $routes->match(['get', 'post'], '/', 'authentication\AuthenticationController::login');
    $routes->match(['get', 'post'], 'login', 'authentication\AuthenticationController::login');
    $routes->get('/dashboard', 'dashboard\DashboardController::index'); 
    $routes->post('login/login_form', 'authentication\AuthenticationController::login_form');
    $routes->get('logout', 'authentication\AuthenticationController::logout');
    $routes->get('dashboard', 'dashboard\DashboardController::index');

    $routes->get('profile', 'user\UserController::user_profile');

    //department
    $routes->get('departments/index', 'departments\DepartmentController::departments');
    $routes->get('departments/add-department', 'departments\DepartmentController::addDepartment');
    $routes->get('departments/edit-department/(:num)', 'departments\DepartmentController::editDepartment/$1');
    $routes->get('departments/delete-department/(:num)', 'departments\DepartmentController::deleteDepartment/$1');

    $routes->get('departments/dept-publications/(:num)', 'departments\DepartmentController::publications/$1');
    $routes->get('departments/add-publication/(:num)', 'departments\DepartmentController::addPublication/$1');
    $routes->get('departments/edit-publication/(:num)', 'departments\DepartmentController::editPublication/$1');
    $routes->get('departments/delete-publication/(:num)/(:num)', 'departments\DepartmentController::deletePublication/$1/$2');

    $routes->get('departments/dept-news/(:num)', 'departments\DepartmentController::news/$1');
    $routes->get('departments/add-news/(:num)', 'departments\DepartmentController::addNews/$1');
    $routes->get('departments/edit-news/(:num)', 'departments\DepartmentController::editNews/$1');
    $routes->get('departments/delete-news/(:num)/(:num)', 'departments\DepartmentController::deleteNews/$1/$2');

    //faculty
    $routes->get('departments/faculty-details', 'departments\DepartmentController::faculty_details');
    $routes->get('departments/add-faculty', 'departments\DepartmentController::addFaculty');
    $routes->get('departments/edit-faculty/(:num)', 'departments\DepartmentController::editFaculty/$1');
    $routes->get('departments/delete-faculty/(:num)', 'departments\DepartmentController::deleteFaculty/$1');

    //residents
    $routes->get('departments/residents-details', 'departments\DepartmentController::residents_details');
    $routes->get('departments/add-residents', 'departments\DepartmentController::addResidents');
    $routes->get('departments/edit-residents/(:num)', 'departments\DepartmentController::editResidents/$1');
    $routes->get('departments/delete-residents/(:num)', 'departments\DepartmentController::deleteResidents/$1');

     //gallery
    $routes->get('departments/gallery-details', 'departments\DepartmentController::gallery_details');
    $routes->get('departments/add-gallery', 'departments\DepartmentController::addGallery');
    $routes->get('departments/edit-gallery/(:num)', 'departments\DepartmentController::editGallery/$1');
    $routes->get('departments/delete-gallery/(:num)', 'departments\DepartmentController::deleteGallery/$1');

     //posts
    $routes->get('departments/posts', 'departments\DepartmentController::posts_details');
    $routes->get('departments/add-posts', 'departments\DepartmentController::addPosts');
    $routes->get('departments/edit-posts/(:num)', 'departments\DepartmentController::editPosts/$1');
    $routes->get('departments/delete-posts/(:num)', 'departments\DepartmentController::deletePosts/$1');

    //courses
    $routes->get('courses', 'course\CourseController::courses');
    $routes->get('courses/add', 'course\CourseController::addCourses');
    $routes->get('courses/edit-course/(:num)', 'course\CourseController::editCourse/$1');
    $routes->get('courses/delete-course/(:num)', 'course\CourseController::deleteCourse/$1');
    $routes->get('courses/course-papers/(:num)', 'course\CourseController::coursePapers/$1');
    $routes->get('courses/add-paper/(:num)', 'course\CourseController::addPaper/$1');
    $routes->get('courses/edit-paper/(:num)', 'course\CourseController::editPaper/$1');
    $routes->get('courses/delete-paper/(:num)', 'course\CourseController::deletepaper/$1');
    $routes->get('courses/delete-paper/(:num)', 'course\CourseController::deletePaper/$1');

    //library
    $routes->get('library/index', 'library\LibraryController::editLibrary');

    $routes->get('library/collection', 'library\LibraryController::collection_details');
    $routes->get('library/collection/add', 'library\LibraryController::addCollection');
    $routes->get('library/collection/edit/(:num)', 'library\LibraryController::editCollection/$1');
    $routes->get('library/collection/delete/(:num)', 'library\LibraryController::deleteCollection/$1');

    $routes->get('library/gallery', 'library\LibraryController::gallery_details');
    $routes->get('library/gallery/add', 'library\LibraryController::addGallery');
    $routes->get('library/gallery/edit/(:num)', 'library\LibraryController::editGallery/$1');
    $routes->get('library/gallery/delete/(:num)', 'library\LibraryController::deleteGallery/$1');

    $routes->get('library/requisition-form', 'library\LibraryController::requisitionForm');
    $routes->get('library/membership-form', 'library\LibraryController::membershipForm');


    $routes->get('library/team', 'library\LibraryController::team_details');
    $routes->get('library/team/add', 'library\LibraryController::addTeam');
    $routes->get('library/team/edit/(:num)', 'library\LibraryController::editTeam/$1');
    $routes->get('library/team/delete/(:num)', 'library\LibraryController::deleteTeam/$1');

    //menu
    $routes->get('menu/index', 'common\MenuController::index');
    $routes->get('menu/add', 'common\MenuController::addMenu');
    $routes->get('menu/edit/(:num)', 'common\MenuController::editMenu/$1');
    $routes->get('menu/delete/(:num)', 'common\MenuController::deleteMenu/$1');

    

    //pages
    $routes->get('page-contents/index', 'interpages\PageContentsController::index');

    $routes->get('page-media/index', 'common\PageMediaController::index');
    $routes->get('page-media/add', 'common\PageMediaController::addMedia');
    $routes->get('page-media/edit/(:num)', 'common\PageMediaController::editMedia/$1');
    $routes->get('page-media/delete/(:num)', 'common\PageMediaController::deleteMedia/$1');

    //contacts
    $routes->get('contacts/enquiry-form', 'contacts\ContactController::enquiryForm');
    $routes->get('contacts/feedback-form', 'contacts\ContactController::feedbackForm');

    $routes->get('contacts/emergency-contacts/index', 'contacts\ContactController::emergencyContactsList');
    $routes->get('contacts/emergency-contacts/add', 'contacts\ContactController::addEmergencyContacts');
    $routes->get('contacts/emergency-contacts/edit/(:num)', 'contacts\ContactController::editEmergencyContacts/$1');
    $routes->get('contacts/emergency-contacts/delete/(:num)', 'contacts\ContactController::deleteEmergencyContacts/$1');

    $routes->get('contacts/key-personnel/index', 'contacts\ContactController::keyPersonnelList');
    $routes->get('contacts/key-personnel/add', 'contacts\ContactController::addkeyPersonnel');
    $routes->get('contacts/key-personnel/edit/(:num)', 'contacts\ContactController::editkeyPersonnel/$1');
    $routes->get('contacts/key-personnel/delete/(:num)', 'contacts\ContactController::deletekeyPersonnel/$1');

    $routes->get('contacts/patient-services/index', 'contacts\ContactController::patinetSerivesList');
    $routes->get('contacts/patient-services/add', 'contacts\ContactController::addpatinetSerives');
    $routes->get('contacts/patient-services/edit/(:num)', 'contacts\ContactController::editpatinetSerives/$1');
    $routes->get('contacts/patient-services/delete/(:num)', 'contacts\ContactController::deletepatinetSerives/$1');

    $routes->get('contacts/administrative-offices/index', 'contacts\ContactController::adminOfficesList');
    $routes->get('contacts/administrative-offices/add', 'contacts\ContactController::addAdminOffices');
    $routes->get('contacts/administrative-offices/edit/(:num)', 'contacts\ContactController::editAdminOffices/$1');
    $routes->get('contacts/administrative-offices/delete/(:num)', 'contacts\ContactController::deleteAdminOffices/$1');

    $routes->get('contacts/office-hours/index', 'contacts\ContactController::officeHoursList');
    $routes->get('contacts/office-hours/add', 'contacts\ContactController::addOfficeHours');
    $routes->get('contacts/office-hours/edit/(:num)', 'contacts\ContactController::editOfficeHours/$1');
    $routes->get('contacts/office-hours/delete/(:num)', 'contacts\ContactController::deleteOfficeHours/$1');

    $routes->get('contacts/campus-locations/index', 'contacts\ContactController::campusLocationsList');
    $routes->get('contacts/campus-locations/add', 'contacts\ContactController::addCampusLocation');
    $routes->get('contacts/campus-locations/edit/(:num)', 'contacts\ContactController::editCampusLocation/$1');
    $routes->get('contacts/campus-locations/delete/(:num)', 'contacts\ContactController::deleteCampusLocation/$1');

    $routes->get('contacts/address/index', 'contacts\ContactController::address');
    $routes->get('contacts/connect/index', 'contacts\ContactController::connect');

    //home 
    $routes->get('home-services/index', 'home\HomeController::services');
    $routes->get('home-academic-programs/index', 'home\HomeController::academicPrograms');

    $routes->get('home-tender-notices/index', 'home\HomeController::tenderNoticesList');
    $routes->get('home-notices/add', 'home\HomeController::addHomeNotices');
    $routes->get('home-notices/edit/(:num)', 'home\HomeController::editNotices/$1');
    $routes->get('home-notices/delete/(:num)', 'home\HomeController::deleteNotices/$1');

    $routes->get('home/basic-details', 'home\HomeController::basic_details');
    



});


$routes->group('api', ['namespace' => 'App\Controllers\api'], function($routes) {
    $routes->post('auth/login', 'AuthController::login');
    $routes->get('user/userdetails', 'UserController::details');
    $routes->post('user/updateuser', 'UserController::updateuser');

    // master api
    $routes->get('departments/get-department-list', 'DepartmentController::getDepartmentList');
    $routes->post('departments/add-department', 'DepartmentController::addDepartment');
    $routes->post('departments/delete-department', 'DepartmentController::deleteDepartment');
    $routes->get('departments/get-department-by-id', 'DepartmentController::getDepartmentById');
    $routes->post('departments/update-department', 'DepartmentController::updateDepartment');
    $routes->get('departments/get-department-all-details', 'DepartmentController::getDepartmentAllDetailsById');

    $routes->get('departments/get-department-publications', 'DepartmentController::getDepartmentPublications');
    $routes->post('departments/add-publication', 'DepartmentController::addPublication');
    $routes->post('departments/delete-publication', 'DepartmentController::deletePublication');
    $routes->get('departments/get-publication-by-id', 'DepartmentController::getPublicationById');
    $routes->post('departments/update-publication', 'DepartmentController::updatePublication');

    $routes->get('departments/get-department-news', 'DepartmentController::getDepartmentNews');
    $routes->post('departments/add-news', 'DepartmentController::addNews');
    $routes->post('departments/delete-news', 'DepartmentController::deleteNews');
    $routes->get('departments/get-news-by-id', 'DepartmentController::getNewsById');
    $routes->post('departments/update-news', 'DepartmentController::updateNews');

    //faculty
    $routes->get('departments/get-faculty-list', 'DepartmentController::getFacultyList');
    $routes->post('departments/add-faculty', 'DepartmentController::addFaculty');
    $routes->get('departments/get-faculty-by-id', 'DepartmentController::getFacultyById');
    $routes->post('departments/update-faculty', 'DepartmentController::updateFaculty');
    $routes->post('departments/delete-faculty', 'DepartmentController::deleteFaculty');

    //residents
    $routes->get('departments/get-residents-list', 'DepartmentController::getResidentsList');
    $routes->post('departments/add-residents', 'DepartmentController::addResidents');
    $routes->get('departments/get-residents-by-id', 'DepartmentController::getResidentsById');
    $routes->post('departments/update-residents', 'DepartmentController::updateResidents');
    $routes->post('departments/delete-residents', 'DepartmentController::deleteResidents');

     //gallery
    $routes->get('departments/get-gallery-list', 'DepartmentController::getGalleryList');
    $routes->post('departments/add-gallery', 'DepartmentController::addGallery');
    $routes->get('departments/get-gallery-by-id', 'DepartmentController::getGalleryById');
    $routes->post('departments/update-gallery', 'DepartmentController::updateGallery');
    $routes->post('departments/remove-gallery', 'DepartmentController::deleteGallery');

     //posts
    $routes->get('departments/get-posts-list', 'DepartmentController::getPostsList');
    $routes->post('departments/add-posts', 'DepartmentController::addPosts');
    $routes->get('departments/get-posts-by-id', 'DepartmentController::getPostsById');
    $routes->post('departments/update-posts', 'DepartmentController::updatePosts');
    $routes->post('departments/delete-posts', 'DepartmentController::deletePosts');

    //courses
    $routes->get('courses/get-courses-list', 'CourseController::getCoursesList');
    $routes->post('courses/add-course', 'CourseController::addCourse');
    $routes->get('courses/get-course-by-id', 'CourseController::getCourseById');
    $routes->post('courses/update-course', 'CourseController::updateCourse');
    $routes->post('courses/delete-courses', 'CourseController::deleteCourses');
    $routes->get('courses/get-coursepapers-by-id', 'CourseController::getCoursePaperById');
    $routes->post('courses/add-paper', 'CourseController::addPaper');
    $routes->get('courses/get-paper-by-id', 'CourseController::getPaperById');
    $routes->post('courses/update-paper', 'CourseController::updatePaper');
    $routes->post('courses/delete-paper', 'CourseController::deletePaper');

    $routes->get('courses/get-papers-data', 'CourseController::getPapersData');

    //library
    $routes->get('library/test', 'LibraryController::test');
    $routes->get('library/get-library-info', 'LibraryController::getLibraryInfo');
    $routes->post('library/update-library', 'LibraryController::updateLibrary');

    $routes->get('library/get-library-collection', 'LibraryController::getLibraryCollection');
    $routes->post('library/add-collection', 'LibraryController::addCollection');
    $routes->post('library/delete-collection', 'LibraryController::deleteCollection');
    $routes->get('library/get-library-collection-by-id', 'LibraryController::getLibraryCollectionById');
    $routes->post('library/update-collection', 'LibraryController::updateCollection');

    $routes->get('library/get-gallery-list', 'LibraryController::getGalleryList');
    $routes->post('library/add-gallery', 'LibraryController::addGallery');
    $routes->post('library/delete-gallery', 'LibraryController::deletegallery');
    $routes->get('library/get-gallery-by-id', 'LibraryController::getGalleryById');
    $routes->post('library/update-gallery', 'LibraryController::updateGallery');

    $routes->get('library/get-team-list', 'LibraryController::getTeamList');
    $routes->post('library/add-team', 'LibraryController::addTeam');
    $routes->post('library/delete-team', 'LibraryController::deleteTeam');
    $routes->get('library/get-team-by-id', 'LibraryController::getTeamById');
    $routes->post('library/update-team', 'LibraryController::updateTeam');

    $routes->get('library/get-form-list', 'LibraryController::getFormList');
    $routes->get('library/get-membership-list', 'LibraryController::getMembershipFormList');
    $routes->post('library/submit-requisition-form', 'LibraryController::submitRequisitionForm');
    $routes->post('library/submit-membership-form', 'LibraryController::submitMembershipForm');

    $routes->get('library/get-library-data', 'LibraryController::getLibraryData');
   


    //menu
    $routes->get('menu/get-menu-list', 'MenuController::getMenuList');
    $routes->post('menu/add-menu', 'MenuController::addMenu');
    $routes->post('menu/delete-menu', 'MenuController::deleteMenu');
    $routes->get('menu/get-menu-by-id', 'MenuController::getMenuById');
    $routes->post('menu/update-menu', 'MenuController::updateMenu');

    //interpages
    $routes->post('page-contents/save-or-update', 'PageContentsController::addOrUpdate');
    $routes->get('page-contents/get-by-menu-submenu', 'PageContentsController::getByMenuSubmenu');
    $routes->get('page-contents/get-page-data', 'PageContentsController::getPageData');

    $routes->get('page-media/get-media-list', 'PageMediaController::getMediaList');
    $routes->post('page-media/add-media', 'PageMediaController::addMedia');
    $routes->post('page-media/delete-media', 'PageMediaController::deleteMedia');
    $routes->get('page-media/get-media-by-id', 'PageMediaController::getMediaById');
    $routes->post('page-media/update-media', 'PageMediaController::updateMedia');

    //contacts
    $routes->post('contact/submit-enquiry-form', 'ContactController::submitEnquiryForm');
    $routes->post('contact/submit-feedback-form', 'ContactController::submitFeedbackForm');
    $routes->get('contact/get-enquiryform-list', 'ContactController::getEnquiryFormList');
    $routes->get('contact/get-feedbackform-list', 'ContactController::getFeedbackFormList');

    $routes->get('contact/get-emergencycontacts-list', 'ContactController::getEmergencyContactsList');
    $routes->post('contact/emergency-contacts/add', 'ContactController::addEmergencyContact');
    $routes->get('contact/get-emergencycontacts-by-id', 'ContactController::getEmergencyContactById');
    $routes->post('contact/update-emergency-contact', 'ContactController::updateEmergencyContact');
    $routes->post('contact/delete-emergency-contacts', 'ContactController::deleteEmergencyContact');

    $routes->get('contact/get-keypersonnel-list', 'ContactController::getKeyPersonnelList');
    $routes->post('contact/key-personnel/add', 'ContactController::addKeyPersonnel');
    $routes->get('contact/get-keypersonnel-by-id', 'ContactController::getKeyPersonnelById');
    $routes->post('contact/update-key-personnel', 'ContactController::updateKeyPersonnel');
    $routes->post('contact/delete-key-personnel', 'ContactController::deleteKeyPersonnel');

    $routes->get('contact/get-patientservices-list', 'ContactController::getPatinetServicesList');
    $routes->post('contact/patient-services/add', 'ContactController::addPatientServices');
    $routes->get('contact/get-patientservices-by-id', 'ContactController::getPatientServicesById');
    $routes->post('contact/update-patient-services', 'ContactController::updatePatientServices');
    $routes->post('contact/delete-patient-services', 'ContactController::deletePatientServices');

    $routes->get('contact/get-adminoffices-list', 'ContactController::getAdminOfficesList');
    $routes->post('contact/administrative-offices/add', 'ContactController::addAdministrativeOffices');
    $routes->get('contact/admin-offices/get-by-id', 'ContactController::getAdminOfficesById');
    $routes->post('contact/administrative-offices/update', 'ContactController::updateAdministrativeOffices');
    $routes->post('contact/delete-administrative-office', 'ContactController::deleteAdministrativeOffices');

    $routes->get('contact/get-office-hours-list', 'ContactController::getOfficeHoursList');
    $routes->post('contact/office-hours/add', 'ContactController::addOfficeHours');
    $routes->get('contact/get-officehours-by-id', 'ContactController::getOfficeHoursById');
    $routes->post('contact/update-office-hours', 'ContactController::updateOfficeHours');
    $routes->post('contact/delete-office-hours', 'ContactController::deleteOfficeHours');

    $routes->get('contact/get-campus-locations-list', 'ContactController::getCampusLocationsList');
    $routes->post('contact/campus-location/add', 'ContactController::addCampusLocation');
    $routes->get('contact/get-campus-location-by-id', 'ContactController::getCampusLocationById');
    $routes->post('contact/update-campus-location', 'ContactController::updateCampusLocation');
    $routes->post('contact/delete-campus-location', 'ContactController::deleteCampusLocation');

    $routes->get('contact/get-address', 'ContactController::getAddressById');
    $routes->post('contact/update-address', 'ContactController::updateAddress');
    $routes->post('contact/create-address', 'ContactController::createAddress');

    $routes->get('contact/get-connect-social', 'ContactController::getConnectById');
    $routes->post('contact/update-connect', 'ContactController::updateConnect');
    $routes->post('contact/create-connect', 'ContactController::createConnect');

    //home
    $routes->get('home/get-services', 'HomeController::getServices');
    $routes->post('home/home-services/create', 'HomeController::createServices');
    $routes->post('home/home-services/update', 'HomeController::updateServices');

    $routes->get('home/get-academic-programs', 'HomeController::getAcademicPrograms');
    $routes->post('home/academic-programs/create', 'HomeController::createAcademicPrograms');
    $routes->post('home/academic-programs/update', 'HomeController::updateAcademicPrograms');

    $routes->get('home/get-notices-list', 'HomeController::getNoticesList');
    $routes->post('home/notices/add', 'HomeController::addNotices');
    $routes->get('home/get-notice-by-id', 'HomeController::getNoticeById');
    $routes->post('home/update-notice', 'HomeController::updateNotice');
    $routes->post('home/delete-notice', 'HomeController::deleteNotice');

    $routes->get('home/get-basic-details', 'HomeController::getBasicDetails');
    $routes->post('home/update-basic-details', 'HomeController::updateBasicDetails');
    $routes->post('home/create-basic-details', 'HomeController::createBasicDetails');


    $routes->get('contact/get-contactpage-data', 'ContactController::getContactPageData');
    
    
   
});














