
@if ($configData['mainLayoutType'] === 'horizontal' && isset($configData['mainLayoutType']))
  <nav
    class="header-navbar navbar-expand-lg navbar navbar-fixed align-items-center navbar-shadow navbar-brand-center {{ $configData['navbarColor'] }}"
    data-nav="brand-center">
    <div class="navbar-header d-xl-block d-none">
      <ul class="nav navbar-nav">
        <li class="nav-item">
          <a class="navbar-brand" href="{{ url('/') }}">
            <span class="brand-logo">
              <svg viewbox="0 0 139 95" version="1.1" xmlns="http://www.w3.org/2000/svg"
                xmlns:xlink="http://www.w3.org/1999/xlink" height="24">
                <defs>
                  <lineargradient id="linearGradient-1" x1="100%" y1="10.5120544%" x2="50%" y2="89.4879456%">
                    <stop stop-color="#000000" offset="0%"></stop>
                    <stop stop-color="#FFFFFF" offset="100%"></stop>
                  </lineargradient>
                  <lineargradient id="linearGradient-2" x1="64.0437835%" y1="46.3276743%" x2="37.373316%" y2="100%">
                    <stop stop-color="#EEEEEE" stop-opacity="0" offset="0%"></stop>
                    <stop stop-color="#FFFFFF" offset="100%"></stop>
                  </lineargradient>
                </defs>
                <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                  <g id="Artboard" transform="translate(-400.000000, -178.000000)">
                    <g id="Group" transform="translate(400.000000, 178.000000)">
                      <path class="text-primary" id="Path"
                        d="M-5.68434189e-14,2.84217094e-14 L39.1816085,2.84217094e-14 L69.3453773,32.2519224 L101.428699,2.84217094e-14 L138.784583,2.84217094e-14 L138.784199,29.8015838 C137.958931,37.3510206 135.784352,42.5567762 132.260463,45.4188507 C128.736573,48.2809251 112.33867,64.5239941 83.0667527,94.1480575 L56.2750821,94.1480575 L6.71554594,44.4188507 C2.46876683,39.9813776 0.345377275,35.1089553 0.345377275,29.8015838 C0.345377275,24.4942122 0.230251516,14.560351 -5.68434189e-14,2.84217094e-14 Z"
                        style="fill:currentColor"></path>
                      <path id="Path1"
                        d="M69.3453773,32.2519224 L101.428699,1.42108547e-14 L138.784583,1.42108547e-14 L138.784199,29.8015838 C137.958931,37.3510206 135.784352,42.5567762 132.260463,45.4188507 C128.736573,48.2809251 112.33867,64.5239941 83.0667527,94.1480575 L56.2750821,94.1480575 L32.8435758,70.5039241 L69.3453773,32.2519224 Z"
                        fill="url(#linearGradient-1)" opacity="0.2"></path>
                      <polygon id="Path-2" fill="#000000" opacity="0.049999997"
                        points="69.3922914 32.4202615 32.8435758 70.5039241 54.0490008 16.1851325"></polygon>
                      <polygon id="Path-21" fill="#000000" opacity="0.099999994"
                        points="69.3922914 32.4202615 32.8435758 70.5039241 58.3683556 20.7402338"></polygon>
                      <polygon id="Path-3" fill="url(#linearGradient-2)" opacity="0.099999994"
                        points="101.428699 0 83.0667527 94.1480575 130.378721 47.0740288"></polygon>
                    </g>
                  </g>
                </g>
              </svg></span>
            <h2 class="brand-text mb-0">EWS</h2>
          </a>
        </li>
      </ul>
    </div>
  @else
    <nav
      class="header-navbar navbar navbar-expand-lg align-items-center {{ $configData['navbarClass'] }} navbar-light navbar-shadow {{ $configData['navbarColor'] }} {{ $configData['layoutWidth'] === 'boxed' && $configData['verticalMenuNavbarType'] === 'navbar-floating'? 'container-xxl': '' }}">
@endif
<div class="navbar-container d-flex content">
  <div class="bookmark-wrapper d-flex align-items-center">
    <ul class="nav navbar-nav d-xl-none">
      <li class="nav-item"><a class="nav-link menu-toggle" href="javascript:void(0);"><i class="ficon"
            data-feather="menu"></i></a></li>
    </ul>
  </div>
  <ul class="nav navbar-nav align-items-center ms-auto">
    
    <li class="nav-item dropdown dropdown-user">
      <a class="nav-link dropdown-toggle dropdown-user-link" id="dropdown-user" href="javascript:void(0);"
        data-bs-toggle="dropdown" aria-haspopup="true">
        <div class="user-nav d-sm-flex d-none">
          <span class="user-name fw-bolder " style="text-transform: capitalize">
            @php
              $nama = Str::limit(session()->get("name"),10);
              if(!empty($nama)) {
                echo $nama;
              } else {
                echo "";
              }
            @endphp
          </span>
          <span class="user-status">
            @php
              $levels = session()->get('level');
              if(!empty($levels)) {
                echo $levels;
              } else {
                echo "";
              }
            @endphp
          </span>
        </div>
        <span class="avatar">
          <img class="round"
            src="{{ asset("upload/" . session()->get("photo_profile")) }}"
            alt="avatar" height="40" width="40">
          <span class="avatar-status-online"></span>
        </span>
      </a>
      <div class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdown-user">
        <h6 class="dropdown-header">Manage Profile</h6>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item"
          href="#" data-bs-toggle="modal"
          data-bs-target="#profile">
          <i class="me-50" data-feather="user"></i> Profile
        </a>

        <a class="dropdown-item" href="#" data-bs-toggle="modal"
        data-bs-target="#password">
          <i class="me-50" data-feather="settings"></i> Ganti Password
        </a>



          <div class="dropdown-divider"></div>

        <a class="dropdown-item" href="{{ url('/keluar') }}">
          <i class="me-50" data-feather="power"></i> Logout
        </a>
        <form method="POST" id="logout-form" action="">
          @csrf
        </form>
      </div>
    </li>
  </ul>
</div>
</nav>
<div class="modal fade" id="profile" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog  modal-lg" role="document">
      <form method="POST" enctype="multipart/form-data" class="modal-content" action="{{ url("pengguna/ganti_profile") }}">
          @csrf
          <input type="hidden" name="id" value="{{ session()->get("id") }}">
          @method("PUT")
          <div class="modal-header">
              <h5 class="modal-title" id="modalFullTitle">Ganti Profile</h5>
              <button type="button" class="btn-close" data-bs-dismiss="modal"
                  aria-label="Close"></button>
          </div>
          <div class="modal-body">
              <div class="containers">
                <div class="mb-1">
                  <label for="" style="margin-bottom: 5px !important;"> <h5>Nama</h5></label>
                  <div class="input-groups  mb-2">
                    <input
                      type="text"
                      class="form-control @error('nama')
                    is-invalid
                      @enderror"
                      placeholder="Nama" value="{{ session()->get("name") }}"
                      name="nama"
                    />
                    @error('nama')
                        <small class="text-danger">{{ $message }}</small>
                    @enderror
                  </div>
                </div>
                <div class="mb-1">
                  <label for="" style="margin-bottom: 5px !important;"> <h5>Email</h5></label>
                  <div class="input-groups  mb-2">
                    <input
                      type="email"
                      class="form-control @error('email')
                          is-invalid
                      @enderror"

                      placeholder="Email" value="{{ session()->get("email") }}"
                      name="email"
                    />
                    @error('email')
                        <small class="text-danger">{{ $message }}</small>
                    @enderror
                  </div>
                </div>
                <div class="mb-1">
                  <label for="" style="margin-bottom: 5px !important;"> <h5>Photo Profile</h5></label>
                  <div class="input-groups  mb-2">
                    <input
                      type="file"
                      class="form-control @error('file')
                          is-invalid
                      @enderror"

                      placeholder="file"
                      name="file"
                    />
                    @error('file')
                        <small class="text-danger">{{ $message }}</small>
                    @enderror
                  </div>
                  <input type="hidden" name="file_lama" value="{{ session()->get("photo_profile") }}">
                </div>
              </div>
          </div>
          <div class="modal-footer">
              <button type="button" class="btn btn-label-secondary"
                  data-bs-dismiss="modal">Close</button>
              <button type="submit" class="btn btn-primary">Simpan</button>
          </div>
      </form>
  </div>
</div>
<div class="modal fade" id="password" tabindex="-1" aria-hidden="true">
  <div class="modal-dialog  modal-lg" role="document">
      <form method="POST" enctype="multipart/form-data" class="modal-content" action="{{ url('pengguna/ganti_password') }}">
          @csrf
          @method("PUT")
          <input type="hidden" name="id" value="{{ session()->get('id') }}">
          <div class="modal-header">
              <h5 class="modal-title" id="modalFullTitle">Ganti Password</h5>
              <button type="button" class="btn-close" data-bs-dismiss="modal"
                  aria-label="Close"></button>
          </div>
          <div class="modal-body">
              <div class="containers">
                <div class="mb-1">
                  <label for="" style="margin-bottom: 5px !important;"> <h5>Password Baru</h5></label>
                  <div class="input-group form-password-toggle ">
                    <input
                      type="password"
                      class="form-control @error('password_satu')
                          is-invalid
                      @enderror"
                      id="basic-default-password"
                      placeholder="Password Baru"
                      name="password_satu"
                      aria-describedby="basic-default-password"
                    />
                    <span class="input-group-text cursor-pointer"><i data-feather="eye"></i></span>
                  </div>
                  @error('password_satu')
                      <small class="text-danger">{{ $message }}</small>
                  @enderror
                </div>
                <div class="mb-1">
                  <label for="" style="margin-bottom: 5px !important;"> <h5>Konfirmasi Password Baru</h5></label>
                  <div class="input-group form-password-toggle ">
                    <input
                      type="password"
                      class="form-control  @error('password_dua')
                      is-invalid
                  @enderror" 
                      id="basic-default-password"
                      placeholder="Konfirmasi Password Baru"
                      name="password_dua"
                      aria-describedby="basic-default-password"
                    />
                    <span class="input-group-text cursor-pointer"><i data-feather="eye"></i></span>
                  </div>
                  @error('password_dua')
                      <small class="text-danger" >{{ $message }}</small>
                  @enderror
                </div>
              </div>
          </div>
          <div class="modal-footer">
              <button type="button" class="btn btn-label-secondary"
                  data-bs-dismiss="modal">Close</button>
              <button type="submit" class="btn btn-primary">Simpan</button>
          </div>
      </form>
  </div>
</div>
{{-- Search Start Here --}}


{{-- if main search not found! --}}
<ul class="main-search-list-defaultlist-other-list d-none">
  <li class="auto-suggestion justify-content-between">
    <a class="d-flex align-items-center justify-content-between w-100 py-50">
      <div class="d-flex justify-content-start">
        <span class="me-75" data-feather="alert-circle"></span>
        <span>No results found.</span>
      </div>
    </a>
  </li>
</ul>

<style>
      table thead tr,
        table thead tr th,
        table tbody tr,
        table tbody tr td {
            border: 1px solid rgba(229, 224, 224, 0.851);
        }
</style>
{{-- Search Ends --}}
<!-- END: Header-->
