const express = require('express');

const accountHolderRoutes = require('../routes/account-holder');
const bookingRoutes = require('../routes/booking');
const employeeRoutes = require('../routes/employee');
const financialTransactionRoutes = require('../routes/financial-transaction');
const inspectionRoutes = require('../routes/inspection');
const invoiceRoutes = require('../routes/invoice');
const paymentGatewayRoutes = require('../routes/payment-gateway');
const peripheralsRoutes = require('../routes/peripherals');
const posRoutes = require('../routes/pos');
const reservationRoutes = require('../routes/reservation');

const routes = (app) => {
    const router = express.Router();

    // ACCOUNT HOLDER
    accountHolderRoutes(router);

    // BOOKING
    bookingRoutes(router);

    // EMPLOYEE
    employeeRoutes(router);

    // FINANCIAL TRANSACTION
    financialTransactionRoutes(router);

    // INSPECTION
    inspectionRoutes(router);

    // INVOICE
    invoiceRoutes(router);

    // PAYMENT GATEWAY
    paymentGatewayRoutes(router);

    // PERIPHERALS
    peripheralsRoutes(router);

    // POS
    posRoutes(router);

    // RESERVATION
    reservationRoutes(router);

    // ENDPOINT
    app.use('/api', router);
}

module.exports = routes;
