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

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <title>Admin Kopkar</title>
    <link rel="stylesheet" href="{{ url('assets') }}/admin/template/assets/vendors/mdi/css/materialdesignicons.min.css" />
    <link rel="stylesheet" href="{{ url('assets') }}/admin/template/assets/vendors/flag-icon-css/css/flag-icon.min.css" />
    <link rel="stylesheet" href="{{ url('assets') }}/admin/template/assets/vendors/css/vendor.bundle.base.css" />
    <link rel="stylesheet"
        href="{{ url('assets') }}/admin/template/assets/vendors/font-awesome/css/font-awesome.min.css" />
    <link rel="stylesheet"
        href="{{ url('assets') }}/admin/template/assets/vendors/bootstrap-datepicker/bootstrap-datepicker.min.css" />
    <link rel="stylesheet" href="{{ url('assets') }}/admin/template/assets/css/style.css" />
    <link rel="shortcut icon" href="{{ url('assets') }}/admin/template/assets/images/favicon.png" />

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11.16.0/dist/sweetalert2.min.css">

    <link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">

</head>


<body>
    <div class="container-scroller">
        <nav class="sidebar sidebar-offcanvas" id="sidebar" style="background-color:  #8FBC8F!important">
            <div class="text-center sidebar-brand-wrapper d-flex align-items-center">
                <a class="sidebar-brand brand-logo font-weight-bold text-uppercase" href="{{ url('admin') }}">
                    SIKOPKAR
                </a>
                <a class="sidebar-brand brand-logo-mini font-weight-bold text-uppercase pl-4 pt-3"
                    href="{{ url('admin') }}">
                    SKP
                </a>
            </div>

            <ul class="nav">
                <li class="nav-item nav-profile">
                    <a href="#" class="nav-link">
                        <div class="nav-profile-image">
                            <img src="{{ url('assets') }}/admin/template/assets/images/faces/face1.jpg"
                                alt="profile" />
                            <span class="login-status online"></span>
                            <!--change to offline or busy as needed-->
                        </div>
                        <div class="nav-profile-text d-flex flex-column pr-3">
                            <span class="font-weight-medium mb-2">{{ auth()->user()->level }}</span>
                        </div>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{{ url('admin') }}">
                        <i class="mdi mdi-home menu-icon"></i>
                        <span class="menu-title">Dashboard</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{{ url('admin/nasabah') }}">
                        <i class="mdi mdi-account-outline menu-icon"></i>
                        <span class="menu-title">Nasabah</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{{ url('admin/datanilai') }}">
                        <i class="mdi mdi mdi-equal-box menu-icon"></i>
                        <span class="menu-title">Data Nilai</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{{ url('admin/laporan') }}">
                        <i class="mdi mdi-file-chart menu-icon"></i>
                        <span class="menu-title">Laporan</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="{{ url('admin/pengaturan') }}">
                        <i class="mdi mdi-settings menu-icon"></i>
                        <span class="menu-title">Pengaturan</span>
                    </a>
                </li>

            </ul>
        </nav>
        <div class="container-fluid page-body-wrapper">
            <div id="theme-settings" class="settings-panel">
                <i class="settings-close mdi mdi-close"></i>
                <p class="settings-heading">SIDEBAR SKINS</p>
                <div class="sidebar-bg-options selected" id="sidebar-default-theme">
                    <div class="img-ss rounded-circle bg-light border mr-3"></div> Default
                </div>
                <div class="sidebar-bg-options" id="sidebar-dark-theme">
                    <div class="img-ss rounded-circle bg-dark border mr-3"></div> Dark
                </div>
                <p class="settings-heading mt-2">HEADER SKINS</p>
                <div class="color-tiles mx-0 px-4">
                    <div class="tiles light"></div>
                    <div class="tiles dark"></div>
                </div>
            </div>
            <nav class="navbar col-lg-12 col-12 p-lg-0 fixed-top d-flex flex-row">
                <div class="navbar-menu-wrapper d-flex align-items-stretch justify-content-between"
                    style="background-color: #F0FFF0!important">
                    <a class="navbar-brand brand-logo-mini align-self-center d-lg-none" href="{{ url('admin') }}"><img
                            src="{{ url('assets') }}/admin/template/assets/images/logo-mini.svg" alt="logo" /></a>
                    <button class="navbar-toggler navbar-toggler align-self-center mr-2" type="button"
                        data-toggle="minimize">
                        <i class="mdi mdi-menu"></i>
                    </button>

                    <ul class="navbar-nav navbar-nav-right ml-lg-auto">

                        <li class="nav-item nav-profile dropdown border-0">
                            <a class="nav-link dropdown-toggle" id="profileDropdown" href="#"
                                data-toggle="dropdown">
                                <img class="nav-profile-img mr-2" alt=""
                                    src="{{ url('assets') }}/admin/template/assets/images/faces/face1.jpg" />
                                <span class="profile-name">{{ auth()->user()->username }}</span>
                            </a>
                            <div class="dropdown-menu navbar-dropdown w-100" aria-labelledby="profileDropdown">
                                <a class="dropdown-item" href="{{ url('logout') }}">
                                    <i class="mdi mdi-logout mr-2 text-primary"></i> Signout </a>
                            </div>
                        </li>
                    </ul>
                    <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button"
                        data-toggle="offcanvas">
                        <span class="mdi mdi-menu"></span>
                    </button>
                </div>
            </nav>
            <div class="main-panel">

                @yield('content')

                <footer class="footer">
                    <div class="d-sm-flex justify-content-center justify-content-sm-between">
                        <span class="text-muted d-block text-center text-sm-left d-sm-inline-block">Copyright ©
                            Tugas Akhir {{ date('Y') }}</span>
                    </div>
                </footer>
            </div>
            <!-- main-panel ends -->
        </div>
        <!-- page-body-wrapper ends -->
    </div>
    <!-- container-scroller -->
    <!-- plugins:js -->
    <script src="{{ url('assets') }}/admin/template/assets/vendors/js/vendor.bundle.base.js"></script>
    <!-- endinject -->
    <!-- Plugin js for this page -->
    <script src="{{ url('assets') }}/admin/template/assets/vendors/chart.js/Chart.min.js"></script>
    <script src="{{ url('assets') }}/admin/template/assets/vendors/bootstrap-datepicker/bootstrap-datepicker.min.js">
    </script>
    <script src="{{ url('assets') }}/admin/template/assets/vendors/flot/jquery.flot.js"></script>
    <script src="{{ url('assets') }}/admin/template/assets/vendors/flot/jquery.flot.resize.js"></script>
    <script src="{{ url('assets') }}/admin/template/assets/vendors/flot/jquery.flot.categories.js"></script>
    <script src="{{ url('assets') }}/admin/template/assets/vendors/flot/jquery.flot.fillbetween.js"></script>
    <script src="{{ url('assets') }}/admin/template/assets/vendors/flot/jquery.flot.stack.js"></script>
    <script src="{{ url('assets') }}/admin/template/assets/vendors/flot/jquery.flot.pie.js"></script>
    <!-- End plugin js for this page -->
    <!-- inject:js -->
    <script src="{{ url('assets') }}/admin/template/assets/js/off-canvas.js"></script>
    <script src="{{ url('assets') }}/admin/template/assets/js/hoverable-collapse.js"></script>
    <script src="{{ url('assets') }}/admin/template/assets/js/misc.js"></script>
    <!-- endinject -->
    <!-- Custom js for this page -->
    <script src="{{ url('assets') }}/admin/template/assets/js/dashboard.js"></script>
    <!-- End custom js for this page -->

    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.16.0/dist/sweetalert2.all.min.js"></script>

    @if (session('success'))
        <script>
            Swal.fire({
                icon: 'success',
                title: 'Success',
                text: '{{ session('success') }}',
            });
        </script>
    @endif

    @if (session('error'))
        <script>
            Swal.fire({
                icon: 'error',
                title: 'Error',
                text: '{{ session('error') }}',
            });
        </script>
    @endif

    <!-- Tambahkan DataTables -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>

    <script>
        $(document).ready(function() {
            $('#datatable').DataTable({
                // "paging": true,
                "ordering": false,
                // "info": true,
                // "autoWidth": false
            });
        });
    </script>

    @yield('script')

</body>

</html>
