<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,minimal-ui">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <meta name="author" content="{{ website_config('main')->meta_author }}" />
    <meta name="keywords" content="{{ website_config('main')->meta_keywords }}" />
    <meta name="description" content="{{ website_config('main')->meta_description }}" />
    <title>{{ website_config('main')->website_name }}</title>
    <link rel="shortcut icon" href="{{ url('file/images/'.website_config('main')->website_favicon.'') }}">
    @include('assets.header-resources')
    <link href="{{ asset('assets/'.website_config('template')->number.'/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ asset('assets/'.website_config('template')->number.'/css/icons.min.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ asset('assets/'.website_config('template')->number.'/css/app.min.css') }}" rel="stylesheet" type="text/css" />
    <script src="{{ asset('assets/'.website_config('template')->number.'/libs/jquery/jquery.min.js') }}"></script>
    <script src="{{ asset('assets/'.website_config('template')->number.'/libs/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
    @yield('another-header-resources')
</head>
<body data-sidebar="dark">
    <div id="layout-wrapper">
        <header id="page-topbar">
            <div class="navbar-header">
                <div class="d-flex">
                    <div class="navbar-brand-box">
                        <a href="{{ url('/') }}" class="logo logo-dark">
                            <span class="logo-sm text-uppercase text-white" style="font-size: 22px; font-weight: Bold;">
                                <i class="fa fa-globe text-white"></i>
                            </span>
                            <span class="logo-lg text-uppercase text-white" style="font-size: 20px; font-weight: Bold;">
                                {{ website_config('main')->website_name }}
                            </span>
                        </a>
                        <a href="{{ url('/') }}" class="logo logo-light">
                            @if (website_config('main')->website_logo_light <> null)
                            <span class="logo-lg">
                                <img src="{{ url('file/images/'.website_config('main')->website_logo_light.'') }}" alt="" style="height: 50px;">
                            </span>
                            @else
                            <span class="logo-lg text-uppercase text-white" style="font-size: 20px; font-weight: Bold;">
                                {{ website_config('main')->website_name }}
                            </span>
                            @endif
                            @if (website_config('main')->website_logo_small_light <> null)
                            <span class="logo-sm">
                                <img src="{{ url('file/images/'.website_config('main')->website_logo_small_light.'') }}" alt="" height="40">
                            </span>
                            @else
                            <span class="logo-sm text-uppercase text-white" style="font-size: 20px; font-weight: Bold;">
                                <i class="fa fa-globe"></i>
                            </span>
                            @endif
                        </a>
                    </div>
                    <button type="button" class="btn btn-sm px-3 font-size-24 header-item waves-effect" id="vertical-menu-btn">
                        <i class="mdi mdi-backburger"></i>
                    </button>
                </div>
                <div class="d-flex">
                    @if (Auth::guard('admin')->check() == true)
                    <div class="dropdown d-inline-block">
                        <button type="button" class="btn header-item waves-effect" id="page-header-user-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="fa fa-user"></i>
                            <span class="d-none d-sm-inline-block ml-1">
                                {{ Auth::guard('admin')->user()->full_name }}
                            </span>
                            <i class="mdi mdi-chevron-down d-none d-sm-inline-block"></i>
                        </button>
                        <div class="dropdown-menu dropdown-menu-right">
                            <a class="dropdown-item" href="{{ url('admin/auth/logout') }}">
                                <i class="mdi mdi-logout font-size-16 align-middle mr-1"></i> 
                                Keluar
                            </a>
                        </div>
                    </div>
                    @endif
                </div>
            </div>
        </header>
        <div class="vertical-menu">
            <div data-simplebar class="h-100">
                <div id="sidebar-menu">
                    <ul class="metismenu list-unstyled" id="side-menu">
                        @include('admin.layouts.navigation')
                    </ul>
                </div>
            </div>
        </div>
        <div class="main-content">
            <div class="page-content">
                <div class="container-fluid">
                    <div class="modal fade" id="modal" id="modal-detail" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true" style="display: none;">
                        <div class="modal-dialog modal-dialog-centered modal-lg">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h5 class="modal-title mt-0" id="modal-title"></h5>
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                </div>
                                <div class="modal-body" id="modal-detail-body">
                                </div>
                                <div class="modal-footer hidden" id="modal-footer">
                                    <button type="button" class="btn btn-light" data-dismiss="modal">Tutup</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="page-title-box d-flex align-items-center justify-content-between">
                                <h4 class="mb-0 font-size-18">@yield('breadcrumb-first')</h4>
                                <div class="page-title-right">
                                    <ol class="breadcrumb m-0">
                                        <li class="breadcrumb-item"><a href="javascript: void(0);">@yield('breadcrumb-second')</a></li>
                                        <li class="breadcrumb-item active">@yield('breadcrumb-first')</li>
                                    </ol>
                                </div>
                            </div>
                        </div>
                        @hasSection('button')
                        <div class="col-lg-12" style="margin-bottom: 20px; margin-top: -10px;">
                            @yield('button')
                        </div>
                        @endif
                    </div>  
                    @include('admin.layouts.alert')
                    @yield('content')
                </div>
            </div>
            <footer class="footer">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-12 text-center">
                            2018 - {{ date('Y') }} © {{ website_config('main')->website_name }}
                            <span class="d-none d-sm-inline-block"> - Crafted with <i class="mdi mdi-heart text-danger"></i> by {{ website_config('main')->meta_author }}.</span>
                        </div>
                    </div>
                </div>
            </footer>
        </div>
    </div>
    <div class="rightbar-overlay"></div>
    <script src="{{ asset('assets/'.website_config('template')->number.'/libs/metismenu/metisMenu.min.js') }}"></script>
    <script src="{{ asset('assets/'.website_config('template')->number.'/libs/simplebar/simplebar.min.js') }}"></script>
    <script src="{{ asset('assets/'.website_config('template')->number.'/libs/node-waves/waves.min.js') }}"></script>
    @include('assets.footer-resources')
    <script src="{{ asset('assets/'.website_config('template')->number.'/js/app.js') }}"></script>
</body>
</html>