import express from 'express'
// import { budgetSetup } from '../controllers/budgetSetupController.js'
import { budgetSearch } from '../controllers/budgetSearchController.js'
import { budgetAdd } from '../controllers/budgetAddController.js'
import { projectSearch } from '../controllers/projectSearchController.js'
import { projectAdd } from '../controllers/projectAddController.js'
import { budgetExpense } from '../controllers/budgetExpenseController.js'
import { reportController } from '../controllers/ReportController.js'
import { transactionSearch } from '../controllers/transactionSearchController.js'

// import { authMiddleware } from '../middlewares/auth.js'
// import { sendResponse } from '../utils/response.js'

const router = express.Router()
const controller_projectSearch_post = new projectSearch()
const controller_budgetSearch_post = new budgetSearch()
const controller_budgetAdd_post = new budgetAdd()
const controller_budgetSetup_post = new budgetExpense()
const controller_report_post = new reportController()
const controller_projectAdd_post = new projectAdd()
const controller_transactionSearch_post = new transactionSearch()

// router.post('/budgetSetup', async (req, res) => {
//   const result = await controller_budgetSetup_post.onNavigate(req, res)
//   if (result) return res.json(result)
// })

router.post('/budgetadd', async (req, res) => {
  const result = await controller_budgetAdd_post.onNavigate(req, res)
  if (result) return res.json(result)
})

router.post('/budgetsearch', async (req, res) => {
  const result = await controller_budgetSearch_post.onNavigate(req, res)
  if (result) return res.json(result)
})

router.post('/projectsearch', async (req, res) => {
  const result = await controller_projectSearch_post.onNavigate(req, res)
  if (result) return res.json(result)
})

router.post('/projectadd', async (req, res) => {
  const result = await controller_projectAdd_post.onNavigate(req, res)
  if (result) return res.json(result)
})

router.post('/transactionsearch', async (req, res) => {
  const result = await controller_transactionSearch_post.onNavigate(req, res)
  if (result) return res.json(result)
})

router.post('/budgetexpense', async (req, res) => {
  const result = await controller_budgetSetup_post.onNavigate(req, res)
  if (result) return res.json(result)
})

router.post('/report', async (req, res) => {
  const result = await controller_report_post.onNavigate(req, res)
  if (result) return res.json(result)
})

export default router
