<?php
session_start();
require_once __DIR__ . "/config/db.php";
require_once __DIR__ . "/inbox_helper.php";

header('Content-Type: application/json');

$data = getInboxData($conn, $_SESSION['role'], $_SESSION['department_id']);

echo json_encode([
    "count" => count($data)
]);