<!DOCTYPE html>
<html lang="en" style="height: auto;" class="">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="{{ asset('templates/dist/img/logo.ico') }}">
    <link rel="shortcut icon" type="image/x-icon" href="{{ asset('templates/dist/img/logo.ico') }}">
    <title>{{ config('app.app_name') }} - @yield('title')</title>
    @include('layouts.partials.styles')
    @yield('styles')
</head>

<body>

    <body class="sidebar-mini layout-fixed layout-navbar-fixed" style="height: auto;">
        <div class="wrapper">

            <div class="preloader flex-column justify-content-center align-items-center" style="height: 0px;">
                <img class="animation__shake" src="{{ asset('templates/dist/img/small-logo.png') }}" alt="Logo"
                    height="60" width="60" style="display: none;">
            </div>

            <nav class="main-header navbar navbar-expand navbar-dark bg-primary">

                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
                                class="fas fa-bars"></i></a>
                    </li>
                
                </ul>

                <ul class="navbar-nav ml-auto">
                    <li class="nav-item">
                        <a class="nav-link" data-widget="fullscreen" href="#" role="button">
                            <i class="fas fa-expand-arrows-alt"></i>
                        </a>
                    </li>

                    <li class="nav-item dropdown" title="Account Profile">
                        <a class="nav-link" data-toggle="dropdown" href="#">
                            {{ Auth::guard('admin')->user()->name }} <i class="far fa-user"></i> 
                        </a>
                        @include('layouts.partials.logout')
                    </li>


                </ul>
            </nav>


            <aside class="main-sidebar elevation-1 sidebar-light-danger">

                <a href="#" class="brand-link bg-light">
                    <img src="{{ asset('templates/dist/img/logo-app.png') }}" alt="App Logo Text" class="brand-text brand-image">
                </a>

                <div
                    class="sidebar os-host os-host-overflow os-host-overflow-y os-host-resize-disabled os-host-scrollbar-horizontal-hidden os-host-transition os-theme-dark">
                    <div class="os-resize-observer-host observed">
                        <div class="os-resize-observer" style="left: 0px; right: auto;"></div>
                    </div>
                    <div class="os-size-auto-observer observed" style="height: calc(100% + 1px); float: left;">
                        <div class="os-resize-observer"></div>
                    </div>
                    <div class="os-content-glue" style="margin: 0px -8px; width: 249px; height: 676px;"></div>
                    <div class="os-padding">
                        <div class="os-viewport os-viewport-native-scrollbars-invisible" style="overflow-y: scroll;">
                            <div class="os-content" style="padding: 0px 8px; height: 100%; width: 100%;">

                                <div class="user-panel mt-3 pb-3 mb-3 d-flex">
                                    <div class="image">
                                        <img src="{{ Avatar::create(Auth::guard('admin')->user()->name)->toBase64() }}"
                                            class="img-circle" alt="User Image">
                                    </div>
                                    <div class="info">
                                        <a class="d-block">{{ Auth::guard('admin')->user()->name }}</a>
                                    </div>
                                </div>
                                @include('layouts.partials.sidebar')
                            </div>
                        </div>
                    </div>
                    <div class="os-scrollbar os-scrollbar-horizontal os-scrollbar-unusable os-scrollbar-auto-hidden">
                        <div class="os-scrollbar-track">
                            <div class="os-scrollbar-handle" style="width: 100%; transform: translate(0px, 0px);"></div>
                        </div>
                    </div>
                    <div class="os-scrollbar os-scrollbar-vertical os-scrollbar-auto-hidden">
                        <div class="os-scrollbar-track">
                            <div class="os-scrollbar-handle" style="height: 57.5686%; transform: translate(0px, 0px);">
                            </div>
                        </div>
                    </div>
                    <div class="os-scrollbar-corner"></div>
                </div>

            </aside>

            <div class="content-wrapper" style="min-height: 677.4px;">
                @yield('admin-content')
            </div>

            @include('layouts.partials.footer')
            @include('layouts.partials.scripts')
            @yield('scripts')
    </body>

</html>
