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

// Mailbox routes
router.post('/create', MailboxController.createTemporaryMailbox);
router.get('/', MailboxController.getMailboxes);
router.get('/:id', MailboxController.getMailbox);
router.delete('/:id', MailboxController.deleteMailbox);

// Message routes
router.get('/:mailboxId/messages', MessageController.getMessages);
router.get('/:mailboxId/messages/:messageId', MessageController.getMessage);
router.delete('/:mailboxId/messages/:messageId', MessageController.deleteMessage);
router.get('/:mailboxId/messages/:messageId/attachments/:attachmentId', MessageController.getAttachment);

module.exports = router; 