const express = require('express');
const router = express.Router();
const ambulanceController = require('../controllers/ambulanceController');

// Get all ambulances
router.get('/', ambulanceController.getAll);

// Get ambulances by status
router.get('/status/:status', ambulanceController.getByStatus);

// Get ambulance by ID
router.get('/:id', ambulanceController.getById);

// Create new ambulance
router.post('/', ambulanceController.create);

// Update ambulance
router.put('/:id', ambulanceController.update);

// Update ambulance status
router.patch('/:id/status', ambulanceController.updateStatus);

// Update ambulance location
router.patch('/:id/location', ambulanceController.updateLocation);

// Delete ambulance
router.delete('/:id', ambulanceController.delete);

module.exports = router;

