<style media="screen">
#kelola {background-color: #cb3689; color: white; border-radius: 25px;}
.horizontal-menu .navbar-light ul#main-menu-navigation > li > #kelola:hover {background-color: #1C77D4 !important; color: white;}
</style>
<!-- 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('dashboard', 'kepegawaian')) ? 'show' : '' ?>" data-menu="megamenu">
                <a class="dropdown-toggle nav-link" href="#" data-toggle="dropdown">
                    <i class="fa fa-dashboard"></i><span> Dashboard</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=='dashboard')?'active':''?>">
                                        <a href="<?= route('dashboard.absensi') ?>" class="nav-link">
                                            <i class="ft-home"></i>
                                            <span>Absensi</span>
                                        </a>
                                    </li>
                                    <li class="nav-item <?= ($aktif=='kepegawaian')?'active':''?>">
                                        <a href="<?= route('dashboard.kepegawaian') ?>" class="nav-link">
                                            <i class="ft-briefcase"></i>
                                            <span>Kepegawaian</span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>

            <li class="dropdown mega-dropdown nav-item <?= in_array($aktif, array('cabang', 'lokasi', 'departemen', 'jabatan', 'shift', 'karyawan', 'jenis_izin')) ? 'show' : '' ?>" data-menu="megamenu">
                <a class="dropdown-toggle nav-link" href="#" data-toggle="dropdown">
                    <i class="ft-box"></i><span>Master Data</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=='cabang')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('master/cabang') ?>">
                                            Cabang
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='departemen')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('master/departemen') ?>">
                                            Departemen
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='jabatan')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('master/jabatan') ?>">
                                            Jabatan
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='lokasi')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('master/lokasi') ?>">
                                            Lokasi
                                        </a>
                                    </li>
                                    <li  class="<?= ($aktif=='jenis_izin')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('master/jenis-izin') ?>">
                                            Jenis Izin
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='shift')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('master/shift') ?>">
                                            Shift
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='karyawan')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('master/karyawan') ?>">
                                            Karyawan
                                        </a>
                                    </li>

                                    <!-- <li  class="<?= ($aktif=='jenis_plafon')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('master/jenis-plafon') ?>">
                                            Jenis Reimbursement
                                        </a>
                                    </li> -->
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>

            <li class="dropdown mega-dropdown nav-item <?= in_array($aktif, array('perusahaan', 'pengaturan_umum','jam_kerja','pengaturan_shift', 'kepala_cabang', 'kepala_departemen','adm_reimbursement', 'atasan_khusus', 'pengaturan_ijin', 'pengaturan_lembur', 'pengaturan_reimbursement', 'kalender', 'pengaturan_notif')) ? 'show submenu2' : '' ?>" data-menu="megamenu">
                <a class="dropdown-toggle nav-link" href="#" data-toggle="dropdown">
                    <i class="fa fa-cog"></i><span> Pengaturan</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=='perusahaan')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengaturan/perusahaan') ?>">
                                            Profil Perusahaan
                                        </a>
                                    </li> -->
                                    <li  class="<?= ($aktif=='pengaturan_umum')?'active':''?>">
                                        <a class="dropdown-item" href="<?= route('pengaturan.umum.home') ?>">
                                            Umum
                                        </a>
                                    </li>
                                    <li  class="<?= ($aktif=='jam_kerja')?'active':''?>">
                                        <a class="dropdown-item" href="<?= route('pengaturan.jamkerja.home') ?>">
                                            Jam Kerja
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='kalender')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengaturan/hari-libur') ?>">
                                            Hari Libur
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='kepala_cabang')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengaturan/kepala-cabang') ?>">
                                            Kepala Cabang
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='kepala_departemen')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengaturan/kepala-departemen') ?>">
                                            Kepala Departemen
                                        </a>
                                    </li>

                                    <li class="<?= ($aktif=='adm_reimbursement')?'active':''?>">
                                        <a class="dropdown-item" href="<?= route('pengaturan.adm.reimbursement.home') ?>">
                                            Admin Reimbursement
                                        </a>
                                    </li>
                                    <!-- <li class="<?= ($aktif=='atasan_khusus')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengaturan/atasan-khusus') ?>">
                                            Atasan Jabatan Khusus
                                        </a>
                                    </li> -->
                                    <li class="<?= ($aktif=='pengaturan_ijin')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengaturan/izin') ?>">
                                            Approval Izin
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='pengaturan_lembur')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengaturan/lembur') ?>">
                                            Approval Lembur
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='pengaturan_reimbursement')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengaturan/reimbursement') ?>">
                                            Approval Reimbursement
                                        </a>
                                    </li>

                                    <li class="<?= ($aktif=='pengaturan_notif')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengaturan/notif') ?>">
                                            Pengaturan Notif
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='pengaturan_shift')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengaturan/shift') ?>">
                                            Pengaturan Shift
                                        </a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>

            <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> 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') ?>">
                                            Laporan Absensi
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='rekap_absensi')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('rekap/absensi/data') ?>">
                                            Rekap Absensi
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='lembur')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengajuan/lembur') ?>">
                                            Pengajuan Lembur
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='izin')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('pengajuan/izin') ?>">
                                            Pengajuan Izin
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='aktivitas')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('laporan/aktivitas') ?>">
                                            Laporan Aktivitas
                                        </a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>

            <li class="dropdown mega-dropdown nav-item <?= in_array($aktif, array('berita', 'pengumuman')) ? 'show' : '' ?>" data-menu="megamenu">
                <a class="dropdown-toggle nav-link" href="#" data-toggle="dropdown">
                    <i class="fa fa-bullhorn"></i><span> Informasi</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=='berita')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('informasi/berita') ?>">
                                            Berita
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='pengumuman')?'active':''?>">
                                        <a class="dropdown-item" href="<?= site_url('informasi/pengumuman') ?>">
                                            Pengumuman
                                        </a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li class="dropdown mega-dropdown nav-item <?= in_array($aktif, array('jenis_plafon','akun_plafon','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> 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=='jenis_plafon')?'active':''?>">
                                        <a href="<?= route('master.jenisplafon.home') ?>" class="nav-link">
                                            <span>Plafon Reimburse</span>
                                        </a>
                                    </li>

                                    <li class="nav-item <?= ($aktif=='akun_plafon')?'active':''?>">
                                        <a href="<?= route('master.akun.home') ?>" class="nav-link">
                                            <span>Akun Reimburse</span>
                                        </a>
                                    </li>
                                    <?php
                                        if($this->adm_reimbursement == true){
                                    ?>
                                        <li class="nav-item <?= ($aktif=='reimburse')?'active':''?>">
                                            <a href="<?= route('reimburse.pengajuan.home') ?>" class="nav-link">
                                                <span>Pengajuan Karyawan</span>
                                            </a>
                                        </li>
                                        <li class="nav-item <?= ($aktif=='laporan_reimburse')?'active':''?>">
                                            <a href="<?= route('reimburse.laporan.home') ?>" class="nav-link">
                                                <span>Laporan Reimburse</span>
                                            </a>
                                        </li>
                                    <?php
                                        }
                                    ?>
                                </ul>
                            </li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li class="dropdown <?= $paket_payroll == '1' ? '' : 'd-none' ?> mega-dropdown nav-item <?= in_array($aktif, array('tunj_tetap', 'tunj_tdk_tetap', 'pot_tetap', 'pot_tdk_tetap', 'master_gapok', 'pengaturan_pot_absensi', 'hitung_gaji','bpjs','laporan_pph', 'master_komponen','data_komponen','data_komponen_tdk_tetap')) ? '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_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=='tunj_tetap')?'active':''?>">
                                        <a class="dropdown-item" href="<?= route('payroll.tunjangan.tetap.home') ?>">
                                            Tunjangan Tetap
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='tunj_tdk_tetap')?'active':''?>">
                                        <a class="dropdown-item" href="<?= route('payroll.tunjangan.tidak.tetap.home') ?>">
                                            Tunjangan Tidak Tetap
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='pot_tetap')?'active':''?>">
                                        <a class="dropdown-item" href="<?= route('payroll.potongan.tetap.home') ?>">
                                            Potongan Tetap
                                        </a>
                                    </li>
                                    <li class="<?= ($aktif=='pot_tdk_tetap')?'active':''?>">
                                        <a class="dropdown-item" href="<?= route('payroll.potongan.tidak.tetap.home') ?>">
                                            Potongan Tidak Tetap
                                        </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>

            <li class="nav-item" style="position:relative;<?= ($aktif=='kelola_mudah')?'background-color: #1C77D4; border-radius: 25px;':''?>">
                <a id="kelola" onclick="showhide()" href="<?= route('quick-setup.cabang') ?>" class="nav-link tst1" style="<?= ($aktif=='kelola_mudah')?'background-color: #cb3689;':''?>">
                    <i class="fa fa-sliders" style="color: white;"></i>
                    <span><b>Kelola Mudah</b></span>
                </a>

                <div id="alert_kelola_mudah" class="alert alert_kelola_mudah" role="alert" style="display: none;">
                  <h4 class="alert-heading">
                    Mulai Pengaturan Sekarang!
                    <button type="button" class="ml-2 mb-1 close" aria-label="Close" onclick="showhide()">
                      <span>×</span>
                    </button>
                  </h4>
                  <p>Mohon Segera Melengkapi Data Cabang, Kepala Cabang, Departemen, Kepala Departemen, dan Staff<br>Agar Bisa Menggunakan Fitur Absenku dengan Maksimal !</p>
                </div>
            </li>
        </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");
            }
        });

        $(document).on('mouseenter mouseleave', '#kelola', function(e) {
          if (e.type == "mouseenter") {
            // check if it is mouseenter, do something
            $('#alert_kelola_mudah').css('display', 'inline-block');
          } else {
            // if not, mouseleave, do something
            $('#alert_kelola_mudah').css('display', 'none');
          }
        });
    </script>
<!-- script untuk menanggulangi submenu 2 baris -->

<script>
function showhide()
{
    var div = document.getElementById("alert_kelola_mudah");
    if (div.style.display !== "none") {
        div.style.display = "none";
    }
    else {
        div.style.display = "inline-block";
    }
}
</script>
