<?php
$certificateNotification = '';
$certificateNotificationUtc = '';
$certificateNotificationMc = '';
$certificateNotificationIc = '';

if ($countAll > 0) {
    $certificateNotification = "<span><i class='fa-solid fa-circle-exclamation'></i></span>";
}
if ($countUtc > 0) {
    $certificateNotificationUtc = "<span class='badge bg-warning text-dark px-2'>$countUtc</span>";
}
if ($countMc > 0) {
    $certificateNotificationMc = "<span class='badge bg-warning text-dark px-2'>$countMc</span>";
}
if ($countIc > 0) {
    $certificateNotificationIc = "<span class='badge bg-warning text-dark px-2'>$countIc</span>";
}
?>

<li> 
    <a class="has-arrow waves-effect waves-dark d-flex justify-content-between align-items-center" href='javascript:void(0)' aria-expanded="false"> 
        <span>
            <i class="fa-solid fa-certificate"></i><span class='hide-menu'>Certificates</span>
        </span> 
        <?= $certificateNotification ?>
    </a>
    <ul aria-expanded="false" class="collapse">
        <li>
            <a href="<?=base_url();?>certificates/training" class="d-flex justify-content-between align-items-center">
                Training 
                <?= $certificateNotificationUtc ?>
            </a>
        </li>
        <li>
            <a href="<?=base_url();?>certificates/maintenance" class="d-flex justify-content-between align-items-center">
                Maintenance 
                <?= $certificateNotificationMc ?>
            </a>
        </li>
        <li>
            <a href="<?=base_url();?>certificates/installation" class="d-flex justify-content-between align-items-center">
                Installation 
                <?= $certificateNotificationIc ?>
            </a>
        </li>
        <!-- <li><a href="<?=base_url();?>certificates/calibration">Callibration</a></li> -->
        <!-- <li><a href="<?=base_url();?>certificates/official-report">Official Report</a></li> -->
    </ul>
</li>
