<!-- Horizontal navigation-->
<div class="header-navbar navbar-expand-sm navbar navbar-horizontal navbar-fixed navbar-light navbar-without-dd-arrow navbar-shadow menu-border" role="navigation" data-menu="menu-wrapper">
    <!-- Horizontal menu content-->
    <div class="navbar-container main-menu-content" data-menu="menu-container">

        <ul class="nav navbar-nav" id="main-menu-navigation" data-menu="menu-navigation">
            <li class="dropdown mega-dropdown nav-item <?= in_array($aktif, array('lembur', 'izin', 'aktivitas', 'data_absensi', 'rekap_absensi')) ? 'show' : '' ?>" data-menu="megamenu">
                <a class="dropdown-toggle nav-link" href="#" data-toggle="dropdown">
                    <i class="fa fa-file-text-o"></i><span> <?= $this->lang->line('menu_kelola_absensi') ?></span>
                </a>
                <ul class="mega-dropdown-menu dropdown-menu row">
                    <li class="col-md-12 p-0" data-mega-col="col-md-12">
                        <ul class="drilldown-menu">
                            <li class="menu-list">
                                <ul class="mega-menu-sub">
                                    <li class="<?= ($aktif == 'data_absensi') ? 'active' : '' ?>">
                                        <a class="dropdown-item" href="<?= route('laporan.absensi.home') ?>">
                                            <?= $this->lang->line('menu_laporan_absensi') ?>
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif == 'rekap_absensi') ? 'active' : '' ?>">
                                        <a class="dropdown-item" href="<?= site_url('rekap/absensi/data') ?>">
                                            <?= $this->lang->line('menu_rekap_absensi') ?>
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif == 'lembur') ? 'active' : '' ?>">
                                        <a class="dropdown-item" href="<?= site_url('pengajuan/lembur') ?>">
                                            <?= $this->lang->line('menu_pengajuan_lembur') ?>
                                            <?php
                                            if ($this->paket_arr['shift'] === false) {
                                                echo '<i class="fa fa-lock text-danger"></i>';
                                            }
                                            ?>
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif == 'izin') ? 'active' : '' ?>">
                                        <a class="dropdown-item" href="<?= route('pengajuan.izin.home') ?>">
                                            <?= $this->lang->line('menu_pengajuan_izin') ?>
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif == 'aktivitas') ? 'active' : '' ?>">
                                        <a class="dropdown-item" href="<?= site_url('laporan/aktivitas') ?>">
                                            <?= $this->lang->line('menu_laporan_aktivitas') ?>
                                            <?php
                                            if ($this->paket_arr['shift'] === false) {
                                                echo '<i class="fa fa-lock text-danger"></i>';
                                            }
                                            ?>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
            <?php
            if ($this->id_company != '202501923') {
            if ($this->paket_arr['reimburse'] === true) {
            ?>
                <li class="dropdown mega-dropdown nav-item <?= in_array($aktif, array('reimburse_saya', 'reimburse', 'laporan_reimburse')) ? 'show' : '' ?>" data-menu="megamenu">
                    <a class="dropdown-toggle nav-link" href="#" data-toggle="dropdown">
                        <i class="fa fa-file-text-o"></i><span> <?= $this->lang->line('menu_reimbursement') ?></span>
                    </a>
                    <ul class="mega-dropdown-menu dropdown-menu row">
                        <li class="col-md-12 p-0" data-mega-col="col-md-12">
                            <ul class="drilldown-menu">
                                <li class="menu-list">
                                    <ul class="mega-menu-sub">
                                        <li class="nav-item <?= ($aktif == 'reimburse_saya') ? 'active' : '' ?>" onclick="sessionStorage.setItem('sel_tab',1)">
                                            <a href="<?= route('reimburse.pengajuan.saya', ['pengajuan' => 'saya']) ?>" class="nav-link">
                                                <span><?= $this->lang->line('menu_pengajuan_saya') ?></span>
                                            </a>
                                        </li>
                                        <?php
                                        if ($this->adm_reimbursement == true) {
                                        ?>
                                            <li class="nav-item <?= ($aktif == 'reimburse') ? 'active' : '' ?>" onclick="sessionStorage.setItem('sel_tab',1)">
                                                <a href="<?= route('reimburse.pengajuan.home') ?>" class="nav-link">
                                                    <span><?= $this->lang->line('menu_pengajuan_karyawan') ?></span>
                                                </a>
                                            </li>
                                            <li class="nav-item <?= ($aktif == 'laporan_reimburse') ? 'active' : '' ?>">
                                                <a href="<?= route('reimburse.laporan.home') ?>" class="nav-link">
                                                    <span><?= $this->lang->line('menu_laporan_reimburse') ?></span>
                                                </a>
                                            </li>
                                        <?php
                                        }
                                        ?>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
            <?php
            } else {
            ?>
                <li class="nav-item" data-menu="megamenu">
                    <a href="<?= route('contact.us') ?>" class="nav-link">
                        <i class="fa fa-file-text-o"></i>
                        <span> <?= $this->lang->line('menu_reimbursement') ?></span>
                        <i class="fa fa-lock text-danger"></i>
                    </a>
                </li>
            <?php
            } }
            ?>

            <?php
                if ($this->id_company != '202501923') {
                if ($this->adm_payroll == true) {
                    if ($this->paket_arr['payroll'] === true) {
            ?>
                        <li class="dropdown mega-dropdown nav-item <?= in_array($aktif, array('tunj_tetap', 'tunj_tdk_tetap', 'pot_tetap', 'pot_tdk_tetap', 'master_gapok', 'master_lembur', 'pengaturan_pot_absensi', 'hitung_gaji', 'bpjs', 'laporan_pph', 'master_komponen', 'data_komponen', 'data_komponen_tdk_tetap', 'data_komponen_kehadiran')) ? 'show' : '' ?>" data-menu="megamenu">
                            <a class="dropdown-toggle nav-link" href="#" data-toggle="dropdown">
                                <i class="fa fa-money"></i><span> Payroll</span>
                            </a>
                            <ul class="mega-dropdown-menu dropdown-menu row">
                                <li class="col-md-12 p-0" data-mega-col="col-md-12">
                                    <ul class="drilldown-menu">
                                        <li class="menu-list">
                                            <ul class="mega-menu-sub">
                                                <li class="<?= ($aktif == 'pengaturan_pot_absensi') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.pengaturan.potongan.absensi.home') ?>">
                                                        Pengaturan Umum
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'master_gapok') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.master.gapok.home') ?>">
                                                        Master Gapok
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'master_lembur') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.master.lembur.home') ?>">
                                                        Master Lembur
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'master_komponen') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.master.komponen.pendapatan') ?>">
                                                        Master Komponen
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'data_komponen') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.data.komponen.home') ?>">
                                                        Data Komponen Tetap
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'data_komponen_tdk_tetap') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.data.komponen.tdk.tetap.home') ?>">
                                                        Data Komponen Tidak Tetap
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'data_komponen_kehadiran') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.data.komponen.kehadiran.home') ?>">
                                                        Data Komponen Kehadiran
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'bpjs') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.bpjs') ?>">
                                                        BPJS
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'hitung_gaji') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.gaji.home') ?>">
                                                        Hitung Gaji
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'laporan_pph') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.laporan.pph.home') ?>">
                                                        Laporan PPH21
                                                    </a>
                                                </li>
                                            </ul>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                <?php
                    } else {
                ?>
                        <li class="nav-item" data-menu="megamenu">
                            <a href="<?= route('contact.us') ?>" class="nav-link">
                                <i class="fa fa-money"></i>
                                <span> Payroll</span>
                                <i class="fa fa-lock text-danger"></i>
                            </a>
                        </li>
            <?php
                    }
                } }
            ?>

            <?php if ($this->id_company != '202501923'): ?>
            <?php if ($this->paket_arr['sales_activity'] === true) : ?>
                <?php if ($this->is_sales === true || $this->is_sales_atasan === true || $this->is_sales_admin === true) : ?>
                    <li class="nav-item <?= ($aktif == 'sales_activity') ? 'active' : '' ?>">
                        <a href="<?= route('sales_activity.home') ?>" class="nav-link">
                            <i class="fa fa-pie-chart"></i>
                            <span><?= $this->lang->line('sales_monitoring') ?></span>
                        </a>
                    </li>
                <?php endif; ?>
            <?php endif; ?>
            <?php endif; ?>

            <!-- KPI -->
            <?php if($this->paket_arr['kpi']) : ?>
            <li class="nav-item <?= ($aktif == 'kpi') ? 'active' : '' ?>">
                <a href="<?= route('kpi') ?>" class="nav-link">
                    <i class="fa fa-bars"></i>
                    <span><?= $this->lang->line('kpi') ?></span>
                </a>
            </li>
            <?php endif; ?>

            <?php
                if ($this->adm_payroll == true) {
                    if ($this->paket_arr['payroll'] === true) {
            ?>
                        <li class="dropdown mega-dropdown nav-item <?= in_array($aktif, array('tunj_tetap', 'tunj_tdk_tetap', 'pot_tetap', 'pot_tdk_tetap', 'master_gapok', 'master_lembur', 'pengaturan_pot_absensi', 'hitung_gaji', 'bpjs', 'laporan_pph', 'master_komponen', 'data_komponen', 'data_komponen_tdk_tetap', 'data_komponen_kehadiran')) ? 'show' : '' ?>" data-menu="megamenu">
                            <a class="dropdown-toggle nav-link" href="#" data-toggle="dropdown">
                                <i class="fa fa-money"></i><span> Payroll</span>
                            </a>
                            <ul class="mega-dropdown-menu dropdown-menu row">
                                <li class="col-md-12 p-0" data-mega-col="col-md-12">
                                    <ul class="drilldown-menu">
                                        <li class="menu-list">
                                            <ul class="mega-menu-sub">
                                                <li class="<?= ($aktif == 'pengaturan_pot_absensi') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.pengaturan.potongan.absensi.home') ?>">
                                                        Pengaturan Umum
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'master_gapok') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.master.gapok.home') ?>">
                                                        Master Gapok
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'master_lembur') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.master.lembur.home') ?>">
                                                        Master Lembur
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'master_komponen') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.master.komponen.pendapatan') ?>">
                                                        Master Komponen
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'data_komponen') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.data.komponen.home') ?>">
                                                        Data Komponen Tetap
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'data_komponen_tdk_tetap') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.data.komponen.tdk.tetap.home') ?>">
                                                        Data Komponen Tidak Tetap
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'data_komponen_kehadiran') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.data.komponen.kehadiran.home') ?>">
                                                        Data Komponen Kehadiran
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'bpjs') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.bpjs') ?>">
                                                        BPJS
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'hitung_gaji') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.gaji.home') ?>">
                                                        Hitung Gaji
                                                    </a>
                                                </li>
                                                <li class="<?= ($aktif == 'laporan_pph') ? 'active' : '' ?>">
                                                    <a class="dropdown-item" href="<?= route('payroll.laporan.pph.home') ?>">
                                                        Laporan PPH21
                                                    </a>
                                                </li>
                                            </ul>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                <?php
                    } else {
                ?>
                        <li class="nav-item" data-menu="megamenu">
                            <a href="<?= route('contact.us') ?>" class="nav-link">
                                <i class="fa fa-money"></i>
                                <span> Payroll</span>
                                <i class="fa fa-lock text-danger"></i>
                            </a>
                        </li>
            <?php
                    }
                }
            ?>
        </ul>
    </div>
    <!-- /horizontal menu content-->
</div>
<!-- Horizontal navigation-->


<!-- script untuk menanggulangi submenu 2 baris -->
<!-- mohon apabila ada submenu yg 2 baris tambahkan class submenu2 agar fungsi ini terpanggil Thx -->
<script type="text/javascript">
    $(document).ready(function() {
        if ($('li').hasClass("submenu2"))
            $(".app-content").addClass("margin-submenu");
    });
</script>
<!-- script untuk menanggulangi submenu 2 baris -->
