<!--begin::Sidebar-->
<aside class="app-sidebar shadow bg-white" data-bs-theme="light">
    <!--begin::Sidebar Brand-->
    <div class="sidebar-brand">
        <!--begin::Brand Link-->
        <a href="<?=base_url()?>" class="brand-link">
        <!--begin::Brand Image-->
        <img
            src="<?=base_url()?>assets/logo_retfin.png"
            alt="Logo"
            class="brand-image opacity-75"
        />
        <!--end::Brand Image-->
        <!--begin::Brand Text-->
        <span class="brand-text fw-light"></span>
        <!--end::Brand Text-->
        </a>
        <!--end::Brand Link-->
    </div>
    <!--end::Sidebar Brand-->
    <!--begin::Sidebar Wrapper-->
    <div class="sidebar-wrapper">
        <nav class="mt-2">
        <!--begin::Sidebar Menu-->
        <ul class="nav sidebar-menu flex-column" data-lte-toggle="treeview" role="menu" data-accordion="false">
            <li class="nav-item">
                <a href="<?=base_url()?>" class="nav-link">
                    <i class="nav-icon bi bi-speedometer"></i>
                    <p>Dashboard</p>
                </a>
            </li>
            <?php
            if($user->level == 'admin'):
            ?>
            <li class="nav-header">ADMINISTRASI</li>
            <li class="nav-item">
                <a href="#" class="nav-link">
                    <i class="nav-icon bi bi-box-seam text-primary"></i><p>Data Master<i class="nav-arrow bi bi-chevron-right"></i></p>
                </a>
                <ul class="nav nav-treeview">
                    <li class="nav-item">
                        <a href="<?=base_url()?>meja" class="nav-link">
                            <i class="nav-icon bi bi-circle text-primary"></i>
                            <p>Meja</p>
                        </a>
                    </li>
                    <li class="nav-item">
                    <a href="<?=base_url()?>produk" class="nav-link">
                        <i class="nav-icon bi bi-circle text-primary"></i>
                        <p>Produk</p>
                    </a>
                    </li>
                </ul>
            </li>
            <li class="nav-item">
                <a href="#" class="nav-link">
                    <i class="nav-icon bi bi-clipboard text-primary"></i>
                    <p>Settings
                        <i class="nav-arrow bi bi-chevron-right"></i>
                    </p>
                </a>
                <ul class="nav nav-treeview">
                    <li class="nav-item">
                        <a href="<?=base_url()?>harga" class="nav-link">
                            <i class="nav-icon bi bi-tag text-primary"></i>
                            <p>Harga</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="<?=base_url()?>pajak" class="nav-link">
                            <i class="nav-icon bi bi-tag text-primary"></i>
                            <p>Pajak</p>
                        </a>
                    </li>
                </ul>
            </li>
            <?php endif; ?>

            <li class="nav-header">OPERASIONAL</li>
            <li class="nav-item">
                <a href="#" class="nav-link">
                    <i class="nav-icon bi bi-cart text-success"></i>
                    <p>
                    Transaksi
                    <i class="nav-arrow bi bi-chevron-right"></i>
                    </p>
                </a>
                <ul class="nav nav-treeview">
                    <li class="nav-item">
                        <a href="<?=base_url()?>order" class="nav-link">
                            <i class="nav-icon bi bi-cup-hot text-success"></i>
                            <p>Order</p>
                        </a>
                    </li>
                    <?php
                    if($user->level == 'admin' || $user->level == 'operator'):
                    ?>
                    <li class="nav-item">
                        <a href="<?=base_url()?>takeaway" class="nav-link">
                            <i class="nav-icon bi bi-box2-heart text-success"></i>
                            <p>Takeaway</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="<?=base_url()?>order/riwayat" class="nav-link">
                            <i class="nav-icon bi bi-calendar3 text-success"></i>
                            <p>Riwayat Order</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="<?=base_url()?>takeaway/riwayat" class="nav-link">
                            <i class="nav-icon bi bi-calendar3 text-success"></i>
                            <p>Riwayat Takeaway</p>
                        </a>
                    </li>
                    <?php endif; ?>
                </ul>
            </li>
            <?php
            if($user->level == 'admin' || $user->level == 'operator'):
            ?>
            <li class="nav-item">
                <a href="#" class="nav-link">
                    <i class="nav-icon bi bi-handbag text-warning"></i>
                    <p>
                    Belanja
                    <i class="nav-arrow bi bi-chevron-right"></i>
                    </p>
                </a>
                <ul class="nav nav-treeview">
                    <li class="nav-item">
                        <a href="<?=base_url()?>belanja" class="nav-link">
                            <i class="nav-icon bi bi-bag text-warning"></i>
                            <p>Belanja</p>
                        </a>
                    </li>
                </ul>
            </li>

            <li class="nav-header">LAPORAN</li>
            <li class="nav-item">
                <a href="#" class="nav-link">
                    <i class="nav-icon bi bi-file-earmark-bar-graph text-primary"></i>
                    <p>
                    Transaksi
                    <i class="nav-arrow bi bi-chevron-right"></i>
                    </p>
                </a>
                <ul class="nav nav-treeview">
                    <li class="nav-item">
                        <a href="<?=base_url()?>laporan/transaksi_harian" class="nav-link">
                            <i class="nav-icon bi bi-file-earmark-bar-graph text-primary"></i>
                            <p>Detail Transaksi Harian</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="<?=base_url()?>laporan/metode_penerimaan" class="nav-link">
                            <i class="nav-icon bi bi-file-earmark-bar-graph text-primary"></i>
                            <p>Penerimaan</p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="<?=base_url()?>laporan/belanja_harian" class="nav-link">
                            <i class="nav-icon bi bi-file-earmark-bar-graph text-primary"></i>
                            <p>Belanja</p>
                        </a>
                    </li>
                </ul>
            </li>
            <li class="nav-item">
                <a href="#" class="nav-link">
                    <i class="nav-icon bi bi-file-earmark-bar-graph text-primary"></i>
                    <p>
                    Keuangan
                    <i class="nav-arrow bi bi-chevron-right"></i>
                    </p>
                </a>
                <ul class="nav nav-treeview">
                    <li class="nav-item">
                        <a href="<?=base_url()?>laporan/laba_rugi" class="nav-link">
                            <i class="nav-icon bi bi-file-earmark-bar-graph text-primary"></i>
                            <p>Laba Rugi</p>
                        </a>
                    </li>
                </ul>
            </li>
            <?php endif; ?>
            <?php
            if($user->level == 'admin'):
            ?>
            <li class="nav-header">Administrasi</li>
            <li class="nav-item">
                <a href="<?=base_url()?>pengguna" class="nav-link">
                    <i class="nav-icon bi bi-people text-success"></i>
                    <p>
                    Akun User
                    </p>
                </a>
            </li>
            <?php endif; ?>
        </ul>
        <!--end::Sidebar Menu-->
        </nav>
    </div>
    <!--end::Sidebar Wrapper-->
</aside>
<!--end::Sidebar-->