import express from 'express';

import {
    createDomain,
    getDomains,
    getDomainById,
    updateDomain,
    deleteDomain,
    toggleAutoRenew,
    renewDomain,
    getDomainStats,
    getExpiryAlerts,
    getRenewalActivity,
    sendRenewalAlertEmails,
    sendRenewalAlertEmailToUser,
    getClientLists
} from '../controller/domainmanagementController.js';


const router = express.Router();

router.post('/create', createDomain); //done
router.get('/all', getDomains); //done
router.get('/stats', getDomainStats); //done
router.get('/list', getClientLists); //done
router.get('/expiry-alerts', getExpiryAlerts); //done
router.get('/renewal-activity', getRenewalActivity); //done
router.get('/:id', getDomainById); //done
router.put('/update/:id', updateDomain); //done
router.patch('/toggle-auto-renew/:id', toggleAutoRenew); //done
router.patch('/renew/:id', renewDomain); //done
router.post('/send-renewal-alerts', sendRenewalAlertEmails); //done
router.post('/send-renewal-alert/:id', sendRenewalAlertEmailToUser); //done
router.delete('/delete/:id', deleteDomain); //done

export default router;
