<ul class="list-group list-group-flush notif-list">
    <?php if($data) : ?>
        <li class="list-group-item d-flex justify-content-between align-items-start">
            <span class="text-muted">Status Pesanan</span>
            <a href="javascript:void(0)" class="text-primary read_all">
                Tandai telah dibaca 
                (<span><?= count($this -> app -> get_notif(0)) ?></span>) 
            </a>
        </li>

        <?php foreach($data as $i => $item) : ?>
            <li class="list-group-item py-3 <?= $item -> is_read ?>" id="<?= $item -> token ?>">
                <a href="<?= $item -> url ?>" class="d-flex align-items-start">
                    <div class="_img text-white d-flex justify-content-center align-items-center <?= $item -> bg ?>">
                        <i class="<?= $item -> icon ?>"></i>
                    </div>
                    <div class="_text">
                        <h6 class="truncate-2 mb-1 <?= $item -> color ?>">
                            <?= $item -> judul ?>
                        </h6>
                        <p class="truncate-3 mb-2">
                           <?= $item -> deskripsi ?>
                        </p>
                        <p class="mb-0">
                            <?= tgl(date('d F Y H:i', strtotime($item -> tgl))) ?> WIB
                        </p>
                    </div>
                </a>
            </li>
        <?php endforeach ?>
        
    <?php else: ?>
        <li class="list-group-item py-5 text-center">
            <a href="" class="text-dark d-block">
                <img src="<?= base_url('assets/img/no-notif.png') ?>" alt="Belum ada notifikasi" class="w-px-120">
            </a>
            <p class="mt-4 mb-0">
                Belum ada notfikasi
            </p>
        </li>
    <?php endif ?>
</ul>