import express from 'express';
const router = express.Router();

import * as relocationController from './relocation.controller.js';
import { authenticate } from '../../common/middleware/auth.js';
import { uploadSingle } from '../../common/middleware/upload.js';

// Relocation routes
router.post('/', authenticate as any, relocationController.submitRequest);
router.get('/', authenticate as any, relocationController.getRequests);
router.get('/:id', authenticate as any, relocationController.getRequestById);
router.post('/:id/action', authenticate as any, relocationController.takeAction);
router.post('/:id/documents', authenticate as any, uploadSingle, relocationController.uploadDocuments);
router.post('/:id/documents/:documentId/verify', authenticate as any, relocationController.verifyDocument);
router.post('/:id/documents/:documentId/reject', authenticate as any, relocationController.rejectDocument);

export default router;