<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	https://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are three reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
|	$route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples:	my-controller/index	-> my_controller/index
|		my-controller/my-method	-> my_controller/my_method
*/
$route['default_controller'] = 'welcome';


//admin 
$route['api/team/add'] = 'team/add_team';
$route['api/team/login'] = 'team/login';
$route['api/team'] = 'team/get_team';

$route['api/team/edit/(:num)'] = 'team/edit_team/$1';
$route['api/team/delete/(:num)'] = 'team/delete_team/$1';

//admin
$route['api/admin/login'] = 'user/admin_login';
$route['api/user/add'] = 'user/register_user';
$route['api/user/login'] = 'user/login';
$route['api/user/get_all'] = 'user/get_users';
$route['api/user/edit/(:num)'] = 'user/edit_user/$1';
$route['api/user/delete/(:num)'] = 'user/delete_user/$1';


// safari_tours
$route['api/safari_tour/add'] = 'safari_tours/add_safari_tour'; // add a safari_tour


$route['api/safari/package/add'] = 'safari_tours/add_safari_tour_2'; // add a safari_tour

$route['api/safari/blog/add'] = 'safari_tours/add_safari_blog'; // add a safari_blog_post

$route['api/safari/blogs/get_all/admin'] = 'safari_tours/get_blogs'; // get blogs

$route['api/safari/blog/set_blog_status'] = 'safari_tours/set_blog_status'; // set a package status

$route['api/safari/package/day/add'] = 'safari_tours/add_day'; // add a safari_tour day


$route['api/safari/package/activity/add'] = 'safari_tours/add_activity'; // add activity

$route['api/safari/package/activity/edit/(:num)'] = 'safari_tours/edit_activity/$1'; // edit a safari_tour activity

$route['api/safari/package/rates/add'] = 'safari_tours/add_safari_package_rate'; // add a safari_tour rate

$route['api/safari/package/rates/edit/(:num)'] = 'safari_tours/edit_safari_package_rate/$1'; // edit a safari_tour rate


$route['api/safari/package/rates/edit'] = 'safari_tours/edit_safari_package_rates'; // edit safari_tour rates

$route['api/safari/package/rates/get_all/(:num)'] = 'safari_tours/get_package_rates/$1'; // get a safari_tour rate



$route['api/safari/package/rates/delete/(:num)'] = 'safari_tours/delete_safari_package_rate/$1'; // delete a safari_tour rate

$route['api/safari/package/activity/delete/(:num)'] = 'safari_tours/delete_activity/$1'; // delete a safari_tour activity


$route['api/safari/package/day/edit/(:num)'] = 'safari_tours/edit_day/$1'; // edit a safari_tour day


$route['api/safari/package/day/delete/(:num)'] = 'safari_tours/delete_day/$1'; // delete a safari_tour day


$route['api/safari/package/days/(:num)'] = 'safari_tours/get_days/$1'; // get safari days

// destination country
$route['api/safari/destination/country/add'] = 'safari_tours/add_destination_country'; // add destination country

// get destination countries
$route['api/safari/destination/country/get_all'] = 'safari_tours/get_destination_countries'; 

// get countries admin
$route['api/safari/destination/country/get_all/admin'] = 'safari_tours/get_countries_admin'; 


// get  country destinations
$route['api/safari/country/destinations/(:num)'] = 'safari_tours/get_country_destinations/$1';



// get destination packages
$route['api/safari/destination/packages/(:num)'] = 'safari_tours/get_destination_packages/$1'; 


// get destination countries
$route['api/safari/destination/country/admin/get_all'] = 'safari_tours/get_destination_countries_admin'; 


// edit destination country
$route['api/safari/destination/country/edit/(:num)'] = 'safari_tours/edit_destination_country/$1'; // edit destination country

// delete destination country
$route['api/safari/destination/country/delete/(:num)'] = 'safari_tours/delete_destination_country/$1'; // delete destination country


$route['api/safari/destination/country/get/(:num)'] = 'safari_tours/get_destination_country/$1'; // get destination country

$route['api/safari/tours/country'] = 'safari_tours/get_tours_by_country'; // get tours by country


$route['api/safari/tours/where_to'] = 'safari_tours/get_tours_by_where_to'; // get tours by where to


$route['api/safari/tours/safari_type'] = 'safari_tours/get_tours_by_safari_type'; // get tours by safari_type

$route['api/safari/tours/wild_life'] = 'safari_tours/get_tours_by_wild_life'; // get tours by wild_life


$route['api/safari/package/days'] = 'safari_tours/get_days'; // get safari days

$route['api/safari/package/activities/(:num)'] = 'safari_tours/get_activities/$1'; // get safari activities



$route['api/safari/package/get_qoute'] = 'safari_tours/get_quote'; // get safari quote


$route['api/safari/package/get_qoutes'] = 'safari_tours/get_quotes'; // get safari quotes

$route['api/safari/package/activities'] = 'safari_tours/activities'; // get safari activities


$route['api/safari/package/set_package_status'] = 'safari_tours/set_package_status'; // set a package status

$route['api/safari/package/set_package_featured_status'] = 'safari_tours/set_package_featured_status'; // set a package featured status

$route['api/safari/package/get_all'] = 'safari_tours/get_safari_tours_2'; // get  safari_tours

$route['api/safari/package/get_all/admin'] = 'safari_tours/get_safari_tours_admin'; // get

$route['api/safari/package/get_all/featured'] = 'safari_tours/get_featured_packages'; // get  featured safari_tours

$route['api/safari/package/get/(:num)'] = 'safari_tours/get_safari_tour/$1'; // get  safari_tour

$route['api/safari/package/edit/(:num)'] = 'safari_tours/edit_safari_tour_2/$1';

$route['api/safari/package/delete/(:num)'] = 'safari_tours/delete_safari_tour_2/$1';


$route['api/safari_tour/(:num)'] = 'safari_tours/get_safari_tour/$1'; // get safari_tour
$route['api/safari_tours'] = 'safari_tours/get_safari_tours'; // get safari_tours
$route['api/safari_tour/edit/(:num)'] = 'safari_tours/edit_safari_tour/$1'; //edit safari_tour
$route['api/safari_tour/delete/(:num)'] = 'safari_tours/delete_safari_tour/$1';

// safari tour day add

$route['api/safari_tour/day/add'] = 'safari_tours/add_safari_tour_day'; // add a safari_tour day



//enquiry
$route['api/enquiry/add'] = 'enquiry/add_enquiry'; // add an enquiry
$route['api/enquiries'] = 'enquiry/get_enquiries'; // get enquiries
$route['api/enquiry/(:num)'] = 'enquiry/get_enquiry/$1'; // get  enquiry
$route['api/enquiry/edit/(:num)'] = 'enquiry/edit_enquiry/$1'; // edit  enquiry

$route['api/enquiry/delete/(:num)'] = 'enquiry/delete_enquiry/$1'; // delete  enquiry



//gallery
$route['api/gallery/add'] = 'admin/add_gallery_trip'; // add a gallery trip
$route['api/gallery'] = 'admin/get_gallery'; // get gallery trips
$route['api/gallery/(:num)'] = 'admin/get_enquiry/$1'; // get one gallery trip
$route['api/gallery/edit/(:num)'] = 'admin/edit_enquiry/$1'; // edit gallery trip
$route['api/gallery/delete/(:num)'] = 'admin/delete_enquiry/$1'; // delete  gallery



// safari_tours
$route['api/contact/add'] = 'contact/add_contact_us'; // add a safari_tour
$route['api/contact/(:num)'] = 'contact/get_one_contact_us/$1'; // get safari_tour
$route['api/newsletter/add'] = 'contact/add_news_letter'; 
$route['api/contact/get_all'] = 'contact/get_all_contact'; // get all contact


$route['api/destination/add'] = 'safari_tours/add_destination_to_country'; // add destination to country
$route['api/destinations'] = 'safari_tours/get_destinations'; // get destinations
$route['api/destination/edit/(:num)'] = 'safari_tours/edit_destination_to_country/$1'; // edit destination
$route['api/destination/(:num)'] = 'safari_tours/get_destination/$1'; // get destination
$route['api/destination/delete/(:num)'] = 'safari_tours/delete_destination/$1'; // delete destination


$route['api/experience/add'] = 'safari_tours/add_experience'; // add experience
$route['api/experience/get_all'] = 'safari_tours/get_experiences'; // get experiences

$route['api/destinations/get_all'] = 'safari_tours/get_destinations'; // get experiences
$route['api/experience/edit/(:num)'] = 'safari_tours/edit_experience/$1'; // edit experience
$route['api/experience/(:num)'] = 'safari_tours/get_experience/$1'; // get experience
$route['api/experience/delete/(:num)'] = 'safari_tours/delete_experience/$1'; // delete experience


$route['api/safari/packages/fetch_all'] = 'safari_tours/get_package_ids_and_titles'; // get ids and titles

$route['api/safari/experiences/add_packages'] = 'safari_tours/add_experience_package'; // add packages to an experience

$route['api/safari/destinations/add_packages'] = 'safari_tours/add_destination_package'; // add packages to destination


$route['api/safari/destination/delete_packages'] = 'safari_tours/delete_destination_package'; // delete packages from destination


$route['api/safari/experience/delete_packages'] = 'safari_tours/delete_experience_package'; // delete packages from an experience

$route['api/experience/(:num)'] = 'safari_tours/get_experience/$1'; // get experience

$route['api/safari_types/add_packages'] = 'safari_tours/add_safari_type_package'; // add packages to an safari type

$route['api/safari_types/add'] = 'safari_tours/add_safari_type'; // add safari type


$route['api/safari_types/edit/(:num)'] = 'safari_tours/edit_safari_type/$1'; // edit safari type

$route['api/safari_type/(:num)'] = 'safari_tours/get_safari_type/$1'; // get safari type

$route['api/safari_type/delete/(:num)'] = 'safari_tours/delete_safari_type/$1'; // delete safari type

$route['api/safari_types/delete_packages'] = 'safari_tours/delete_safari_type_package'; // delete packages from safari_types

$route['api/safari_types/get_all'] = 'safari_tours/get_safari_types'; // get safari_types






$route['api/sub_destination/add'] = 'safari_tours/add_sub_destination'; // add sub_destination
$route['api/sub_destination/edit/(:num)'] = 'safari_tours/edit_sub_destination/$1'; // edit sub_destination
$route['api/sub_destination/(:num)'] = 'safari_tours/get_sub_destination/$1'; // get destination

$route['api/sub_destination/delete/(:num)'] = 'safari_tours/delete_sub_destination/$1'; // delete sub_destination

$route['api/contact/delete/(:num)'] = 'contact/delete_contact_us/$1';


//add programme
$route['api/programmes/add'] = 'programmes/add_programme'; // add a programme
// add all other crude routes
$route['api/programmes'] = 'programmes/get_all_programmes'; // get all programmes
$route['api/programmes/(:num)'] = 'programmes/get_programme/$1'; // get one programme
$route['api/programmes/edit/(:num)'] = 'programmes/edit_programme/$1'; // edit programme
$route['api/programmes/delete/(:num)'] = 'programmes/delete_programme/$1'; // delete  programme


// ===================== HOUSEHOLDS =====================
$route['households']['OPTIONS']         = 'households/preflight';
$route['households']['GET']             = 'households/get_households';
$route['households']['POST']            = 'households/create_household';
$route['households/(:num)']['OPTIONS']  = 'households/preflight';
$route['households/(:num)']['GET']      = 'households/get_household/$1';
$route['households/(:num)']['PUT']      = 'households/update_household/$1';
$route['households/(:num)']['DELETE']   = 'households/delete_household/$1';

$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;