import express from 'express';

import {
    createHosting,
    getHostings,
    getHostingById,
    updateHosting,
    deleteHosting,
    renewHosting,
    toggleAutoRenew,
    updateHostingStatus,
    getHostingStats,
    getRenewalReminders,
    getRenewalActivity,
    sendRenewalAlertEmailToUser
} from '../controller/hostingController.js';

const router = express.Router();

router.post('/create', createHosting); //done
router.get('/all', getHostings); //done
router.get('/stats', getHostingStats); //done
router.get('/renewal-reminders', getRenewalReminders);//done
router.get('/renewal-activity', getRenewalActivity); //done
router.get('/:id', getHostingById); //done
router.put('/update/:id', updateHosting); //done
router.patch('/renew/:id', renewHosting); //done
router.patch('/toggle-auto-renew/:id', toggleAutoRenew); //done
router.patch('/status/:id', updateHostingStatus); //done
router.post('/send-renewal-alert/:id', sendRenewalAlertEmailToUser); //done
router.delete('/delete/:id', deleteHosting); //done

export default router;
