const express = require('express');
const BusCentralRouter = express.Router();

const citiesRouter = require('./citiesRoute.js');
const availableTripsRouter = require('./availabletripsRoute.js');
const tripDetailsRouter = require('./tripDetailsRoute.js');
const blockTicketRouter = require('./blockTicketRoute.js');
const bookTicketRouter = require('./bookTicketRoute.js');
const ticketRouter = require('./ticketRoute.js');
const myBookingsRouter = require('./myBookingsRoute.js');
const signupRouter = require('./signupRoute.js');
const signinRouter = require('./signinRoute.js');
const signinCaptchaRouter = require('./signinCaptchaRoute.js');
const forgotPasswordRouter = require('./forgotPasswordRoute.js');
const deleteAccountRouter = require('./deleteAccountRoute.js');
const gmailVerifyRouter = require('./gmailVerifyRoute.js');
const enquirePaymentRouter = require('./enquirePaymentRoute.js');
const paymentOrderRouter = require('./paymentOrderRouter.js');
const billdeskRefundRouter = require('./billdeskRefundRoute');
const razorpayOrderRouter = require('./razorpayOrderRoute.js');
const verifyPaymentRouter = require('./verifyPaymentRoute.js');
const signinWithDeviceRouter = require('./signinWithDeviceRoute.js');
const deviceValidationRouter = require('./deviceValidationRoute.js');
const bbpsOfferRouter = require('./bbpsOfferRoute.js');
const paymentRoute = require('./paymentRoute');
const agentServicesRouter = require('./AgentServicesRoute');
const agentAdminRouter = require('./agentAdminRoute.js'); 

const CancelTicketRouter = require('./cancelTicketRoute.js')
const dbRouter = require('./dbRoute.js');
const offerRouter = require('./offerRoute.js');
// const paymentDetailsRouter = require('./paymentDetailsRoute');
//AUTHRIZATION
const authorize = require('../middleware/auth');
const jwtAuthorization = require('../middleware/jwtAuthorization.js');
const agentSignUpRouter = require('./agentSignUpRoute.js');
const agentSignInRouter = require('./agentSignInRoute.js');
const paymentgatewayRouter = require('./gatewayRoute.js');




BusCentralRouter.use('/cities',authorize,  citiesRouter);
BusCentralRouter.use('/availabletrips',authorize,  availableTripsRouter)
BusCentralRouter.use('/tripdetails',authorize,  tripDetailsRouter)
BusCentralRouter.use('/blockTicket', authorize, blockTicketRouter);
// app.use('/paymentdetails', authorize, paymentDetailsRouter);
BusCentralRouter.use('/bookticket', authorize, bookTicketRouter);
BusCentralRouter.use('/ticket',  ticketRouter);
BusCentralRouter.use('/mybookings', myBookingsRouter);
BusCentralRouter.use('/cancelt',CancelTicketRouter );
BusCentralRouter.use('/signup', signupRouter);
BusCentralRouter.use('/signin', signinRouter);
BusCentralRouter.use('/signincaptcha', signinCaptchaRouter);
BusCentralRouter.use('/forgotpassword', forgotPasswordRouter);
BusCentralRouter.use('/deleteaccount', deleteAccountRouter);
BusCentralRouter.use('/gmailVerify', gmailVerifyRouter);
BusCentralRouter.use('/signin-with-device', signinWithDeviceRouter);
BusCentralRouter.use('/validate-device', deviceValidationRouter);

BusCentralRouter.use('/bd', paymentOrderRouter),
BusCentralRouter.use('/enquiry', enquirePaymentRouter);
BusCentralRouter.use('/billdeskrefund', billdeskRefundRouter);

BusCentralRouter.use('/razorpayment' , razorpayOrderRouter);
BusCentralRouter.use('/verifypayment' , verifyPaymentRouter);
BusCentralRouter.use('/bbps-offer', bbpsOfferRouter);
BusCentralRouter.use('/payment', paymentRoute);
BusCentralRouter.use('/paymentgateway',paymentgatewayRouter);


BusCentralRouter.use('/db', dbRouter);
BusCentralRouter.use('/offer', offerRouter);
BusCentralRouter.use('/agentSignUp', agentSignUpRouter);
BusCentralRouter.use('/agentSignIn', agentSignInRouter);
BusCentralRouter.use('/agent/services', agentServicesRouter);
BusCentralRouter.use('/agent', agentAdminRouter);

module.exports = BusCentralRouter;






