
<!DOCTYPE html>
<html lang="en">

<head>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <meta name="csrf-token" content="{{ csrf_token() }}">

  <title>Sistem Pakar - {{ $data['subtitle']}}</title>
  <link href="<?= frontend('vendor/fontawesome-free/css/all.min.css') ?>" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
  <link href="<?= frontend("css/sb-admin-2.min.css")?>" rel="stylesheet">
  <link href="<?= frontend("vendor/datatables/dataTables.bootstrap4.min.css")?>" rel="stylesheet">
  <link rel="stylesheet" type="text/css" href="{{ frontend('summernote/summernote-bs4.css') }}">
  @stack('css')
</head>

<body id="page-top">
  <div id="wrapper">
      <ul class="navbar-nav bg-gradient-dark sidebar sidebar-dark accordion" id="accordionSidebar">
          <a class="sidebar-brand d-flex align-items-center justify-content-center" href="{{ url('/') }}">
            <div class="sidebar-brand-text mx-3">RUANG ADMIN</div>
          </a>

          <!-- Divider -->
          <hr class="sidebar-divider mb-3">

          <!-- Nav Item - Dashboard -->
          <div class="sidebar-heading">
            Menu Utama
          </div>
          <li class="nav-item">
            <a class="nav-link" href="{{ user()->level == 1 ? app_url('dashboard') : site_url('user', 'dashboard') }}">
                <i class="fas fa-home"></i>
                <span>Beranda</span></a>
          </li>

          @if(user()->level == 1)
            <hr class="sidebar-divider mb-3">

            <div class="sidebar-heading">
              Menu Admin
            </div>

            <li class="nav-item">
              <a class="nav-link" href="{{ app_url('gejala') }}">
                  <i class="fas fa-list"></i>
                  <span>Data Gejala</span></a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="{{ app_url('penyakit') }}">
                  <i class="fas fa-list"></i>
                  <span>Data Kerusakan</span></a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="{{ app_url('rule') }}">
                  <i class="fas fa-link"></i>
                  <span>Data Rule</span></a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="{{ app_url('riwayat') }}">
                  <i class="fas fa-history"></i>
                  <span>Data Riwayat</span></a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="{{ app_url('users') }}">
                  <i class="fas fa-users"></i>
                  <span>Data Pengguna</span></a>
            </li>
          @endif
          <li class="nav-item">
              <a class="nav-link" href="{{ route('account') }}">
                <i class="fas fa-cog"></i>
                <span>Pengaturan Akun</span></a>
          </li>
          <li class="nav-item">
              <a class="nav-link" href="{{ route('logout') }}">
                <i class="fas fa-sign-out-alt"></i>
                <span>Keluar</span></a>
          </li>

          <hr class="sidebar-divider d-none d-md-block">
          <div class="text-center d-none d-md-inline">
              <button class="rounded-circle border-0" id="sidebarToggle"></button>
          </div>
      </ul>

      <div id="content-wrapper" class="d-flex flex-column">
        <div id="content">
          <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
            <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
              <i class="fa fa-bars"></i>
            </button>
            <ul class="navbar-nav ml-auto">
              <li class="nav-item dropdown no-arrow">
                <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <span class="mr-2 d-none d-lg-inline text-gray-600 small">{{ user()->name }}</span>
                </a>
                <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
                  <a class="dropdown-item" href="{{ route('logout') }}" data-toggle="modal" data-target="#logoutModal">
                    <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                    Keluar
                  </a>
                </div>
              </li>
            </ul>
          </nav>

          <div class="container-fluid">
