<?php
require_once __DIR__ . '/../../../Models/Notification.php';

class NotificationController {
    public function index() {
        $notifModel = new Notification();
        
        $page = isset($_GET['p']) ? (int)$_GET['p'] : 1;
        $perPage = 10;
        
        $result = $notifModel->paginateWithDetails($page, $perPage);
        $notifications = $result['data'];
        
        $total = $result['total'];
        $totalPages = ceil($total / $perPage);

        require __DIR__ . '/../../../../views/admin/notifications/index.php';
    }
}
